import { LazyLoaderServiceInterface } from '@internetarchive/lazy-loader-service'; import { RecaptchaWidgetInterface } from './recaptcha-widget'; export interface RecaptchaManagerInterface { /** * Changes the manager's timeout delay to the given number of milliseconds. */ setTimeoutDelay(delay: number): void; /** * Load a recaptcha widget for a given site key or the default site key. */ getRecaptchaWidget(options?: { siteKey?: string; recaptchaParams?: ReCaptchaV2.Parameters; }): Promise; } export declare class RecaptchaManager implements RecaptchaManagerInterface { private static readonly DEFAULT_TIMEOUT; private lazyLoader; private defaultSiteKey?; private recaptchaCache; /** * How long in milliseconds to wait for the recaptcha library to load before timing out. */ private timeout; constructor(options?: { defaultSiteKey?: string; lazyLoader?: LazyLoaderServiceInterface; grecaptchaLibrary?: ReCaptchaV2.ReCaptcha; timeout?: number; }); /** @inheritdoc */ setTimeoutDelay(delay: number): void; /** @inheritdoc */ getRecaptchaWidget(options?: { siteKey?: string; recaptchaParams?: ReCaptchaV2.Parameters; }): Promise; /** * Load the Recaptcha library from Google. * * @returns Promise */ private getRecaptchaLibrary; /** don't use directly, use `getRecaptchaLibrary()` */ private grecaptchaLibraryCache?; }