/// <reference types="vite/client" />

interface ImportMetaEnv {
    readonly VITE_YANDEX_SMARTCAPTCHA_SITEKEY?: string;
    readonly VITE_JIVO_WIDGET_ID?: string;
}

interface ImportMeta {
    readonly env: ImportMetaEnv;
}

interface SmartCaptchaRenderParams {
    sitekey: string;
    callback?: (token: string) => void;
    hl?: string;
    invisible?: boolean;
}

interface SmartCaptcha {
    render(container: HTMLElement | string, params: SmartCaptchaRenderParams): number;
    reset(widgetId?: number): void;
    destroy?(widgetId?: number): void;
    execute?(widgetId?: number): void;
}

interface Window {
    smartCaptcha?: SmartCaptcha;
    __lidSmartCaptchaOnload?: () => void;
}
