///
import * as i0 from '@angular/core';
import { AfterViewInit, OnDestroy, EventEmitter, InjectionToken } from '@angular/core';
import * as i1 from '@sbb-esta/angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { Observable } from 'rxjs';
declare class SbbCaptcha implements AfterViewInit, OnDestroy, ControlValueAccessor {
private _elementRef;
private _loader;
private _zone;
/** Identifier of sbb-captcha. */
id: string;
/**
* SiteKey of the user.
* It is optional.
*/
siteKey?: string;
/**
* The color theme of the widget.
* It is optional.
*/
theme?: ReCaptchaV2.Theme;
/**
* The type of the widget.
* It is optional.
*/
type?: ReCaptchaV2.Type;
/**
* The size of the widget.
* It is optional.
*/
size?: ReCaptchaV2.Size;
/**
* The tabindex of the widget and challenge.
* It is optional.
*/
tabIndex: number;
/**
* The badge of the widget.
* It is optional.
*/
badge?: ReCaptchaV2.Badge;
/** Event generated on captcha checkbox. */
resolved: EventEmitter;
private _subscription;
private _widget;
private _grecaptcha;
private _executeRequested;
private _onChange;
private _onTouched;
constructor(...args: unknown[]);
_onResolve($event: string): void;
writeValue(value: string): void;
registerOnChange(fn: (value: string) => void): void;
registerOnTouched(fn: () => void): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
/**
* Executes the invisible recaptcha.
* Does nothing if component's size is not set to "invisible".
*/
execute(): void;
reset(): void;
private _expired;
private _captchaResponseCallback;
private _grecaptchaReset;
private _renderRecaptcha;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
}
declare class SbbCaptchaModule {
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵmod: i0.ɵɵNgModuleDeclaration;
static ɵinj: i0.ɵɵInjectorDeclaration;
}
declare const SBB_RECAPTCHA_SETTINGS: InjectionToken;
interface SbbRecaptchaSettings {
/**
* SiteKey of the user.
* It is optional.
*/
siteKey?: string;
/**
* The color theme of the widget.
* It is optional.
*/
theme?: ReCaptchaV2.Theme;
/**
* Type of the widget.
* It is optional.
*/
type?: ReCaptchaV2.Type;
/**
* The size of the widget.
* It is optional.
*/
size?: ReCaptchaV2.Size;
/**
* Badge of the widget.
* It is optional.
*/
badge?: ReCaptchaV2.Badge;
}
declare const SBB_RECAPTCHA_DEFAULT_BASE_URL = "https://www.google.com/recaptcha/api.js";
declare const SBB_RECAPTCHA_CALLBACK_NAME = "ng2recaptchaloaded";
declare class SbbWindowRef {
/** The global native browser window object. */
get nativeWindow(): any;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵprov: i0.ɵɵInjectableDeclaration;
}
declare global {
interface Window {
ng2recaptchaloaded: () => void;
}
}
declare const SBB_RECAPTCHA_LANGUAGE: InjectionToken;
declare const SBB_RECAPTCHA_BASE_URL: InjectionToken;
declare const SBB_RECAPTCHA_NONCE: InjectionToken;
declare class SbbCaptchaLoaderService {
private _windowRef;
/** @nocollapse */
private static _ready;
ready: Observable;
private _language;
private _baseUrl;
private _nonce;
private _document;
constructor(...args: unknown[]);
private _init;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵprov: i0.ɵɵInjectableDeclaration;
}
export { SBB_RECAPTCHA_BASE_URL, SBB_RECAPTCHA_CALLBACK_NAME, SBB_RECAPTCHA_DEFAULT_BASE_URL, SBB_RECAPTCHA_LANGUAGE, SBB_RECAPTCHA_NONCE, SBB_RECAPTCHA_SETTINGS, SbbCaptcha, SbbCaptchaLoaderService, SbbCaptchaModule, SbbWindowRef };
export type { SbbRecaptchaSettings };