import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; export interface ReCaptchaConfig { siteKey: string; } export interface OnExecuteData { /** * The name of the action that has been executed. */ action: string; /** * The token that reCAPTCHA v3 provided when executing the action. */ token: string; } export interface OnExecuteErrorData { /** * The name of the action that has been executed. */ action: string; /** * The error which was encountered */ error: any; } export declare class ReCaptchaService { private readonly isBrowser; private readonly siteKey; private readonly zone; private actionBacklog; private grecaptcha?; private onExecuteSubject?; private onExecuteErrorSubject?; private onExecuteObservable?; private onExecuteErrorObservable?; constructor(zone: NgZone, siteKey: string); get onExecute(): Observable; get onExecuteError(): Observable; /** * Executes the provided `action` with reCAPTCHA v3 API. * Use the emitted token value for verification purposes on the backend. * * For more information about reCAPTCHA v3 actions and tokens refer to the official documentation at * https://developers.google.com/recaptcha/docs/v3. * * @param {string} action the action to execute * @returns {Observable} an `Observable` that will emit the reCAPTCHA v3 string `token` value whenever ready. * The returned `Observable` completes immediately after emitting a value. */ execute(action: string): Observable; /** @internal */ private executeActionWithSubject; /** @internal */ private init; /** @internal */ private onLoadComplete; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }