import type { EventHookOn, MaybeRefOrGetter } from '@vueuse/shared';
import type { Ref } from 'vue-demi';
import type { RecaptchaV2CheckboxOptions, RecaptchaV2InvisibleOptions, WidgetID } from '../script-manager/common';
type OmitKeys = 'sitekey' | 'callback' | 'expired-callback' | 'error-callback';
export type RecaptchaV2CheckboxOptionsInput = Omit<RecaptchaV2CheckboxOptions, OmitKeys>;
export type RecaptchaV2InvisibleOptionsInput = Omit<RecaptchaV2InvisibleOptions, OmitKeys>;
export type RecaptchaV2OptionsInput = RecaptchaV2CheckboxOptionsInput | RecaptchaV2InvisibleOptionsInput;
export interface UseChallengeV2Input {
    /**
     * root to mount reCAPTCHA
     */
    root?: MaybeRefOrGetter<Element | undefined>;
    /**
     * Option that pass to reCAPTCHA render
     */
    options?: RecaptchaV2OptionsInput;
}
export declare enum RecaptchaV2State {
    Init = "init",
    Verified = "verified",
    Expired = "expired",
    Error = "error"
}
export interface UseChallengeV2Return {
    /**
     * root element ref to mount reCAPTCHA
     */
    root: Ref<Element | undefined>;
    /**
     * reCAPTCHA widget id
     */
    widgetID: Ref<WidgetID | undefined>;
    /**
     * state of reCAPTCHA
     */
    state: Ref<RecaptchaV2State>;
    /**
     * the verified event
     */
    onVerify: EventHookOn<string>;
    /**
     * the expired event
     */
    onExpired: EventHookOn<void>;
    /**
     * the error event
     */
    onError: EventHookOn<Error>;
    /**
     * execute the challenge
     */
    execute: () => void;
    /**
     * reset reCAPTCHA
     */
    reset: () => void;
}
export declare function useChallengeV2({ root, options }: UseChallengeV2Input): UseChallengeV2Return;
export {};
