interface RecaptchaApi { render: (container: HTMLElement, parameters: { sitekey: string; theme?: 'light' | 'dark'; size?: 'normal' | 'compact' | 'invisible'; hl?: string; callback?: (token: string) => void; 'expired-callback'?: () => void; 'error-callback'?: () => void; }) => number; reset: (widgetId?: number) => void; getResponse: (widgetId?: number) => string; execute: (widgetId?: number) => void; } declare global { interface Window { grecaptcha?: RecaptchaApi; ___grecaptchaOnLoad___?: () => void; } } export interface RecaptchaWidgetHandle { /** Re-roll the captcha — clears the response token. */ reset: () => void; /** Returns the current response token, or empty string when unsolved. */ getResponse: () => string; /** * Programmatically trigger an invisible captcha challenge. Asked before * the widget is ready, it runs as soon as it is. Asked after the script * failed to load, it loads the script again first; if that fails too, * `onError` is called again. */ execute: () => void; } export interface RecaptchaWidgetProps { /** Google reCAPTCHA v2 site key. Required. */ siteKey: string; /** * Visual theme. Defaults to the resolved DS theme (`useTheme`). * Pass `'light'` / `'dark'` to force. */ theme?: 'light' | 'dark'; /** Two-letter locale hint. Defaults to the current i18next language. */ locale?: string; /** Widget size. */ size?: 'normal' | 'compact' | 'invisible'; /** Called with the verification token, or `null` when expired/reset. */ onChange?: (token: string | null) => void; /** Called when the user solves but the token then times out. */ onExpired?: () => void; /** Called when the script or challenge errors out. */ onError?: () => void; /** Error message — wires aria-describedby + announces via the live region. */ error?: string; /** * Whether the widget announces its own "expired" and "failed" status to * screen readers. Default `true`. Pass `false` when the host shows and * announces the failure itself, so it is said once, and not before the * user has done anything. An `error` you pass is announced either way. */ announceStatus?: boolean; /** Override the DOM id; defaults to the surrounding FormField id. */ id?: string; /** Extra class names on the wrapper. */ className?: string; } export declare const RecaptchaWidget: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=recaptcha-widget.d.ts.map