/** GSI callback payload when user signs in. */
interface CredentialResponse {
    credential: string;
}
/** OAuth2 Code Client callback payload (popup mode). */
interface CodeResponse {
    code: string;
}
declare global {
    interface Window {
        google?: {
            accounts: {
                id: {
                    initialize: (config: {
                        client_id: string;
                        callback: (response: CredentialResponse) => void;
                        auto_select?: boolean;
                        /**
                         * When false, avoids using FedCM for One Tap prompts (helps when FedCM is
                         * disabled via browser/site settings).
                         */
                        use_fedcm_for_prompt?: boolean;
                    }) => void;
                    prompt: (momentListener?: (moment: {
                        getMomentType: () => string;
                    }) => void) => void;
                };
                oauth2: {
                    initCodeClient: (config: {
                        client_id: string;
                        scope: string;
                        ux_mode: 'popup';
                        callback: (response: CodeResponse) => void;
                        error_callback?: (error: {
                            type: string;
                            message?: string;
                        }) => void;
                    }) => {
                        requestCode: () => void;
                    };
                };
            };
        };
    }
}
export interface UseGoogleAuthOptions {
    /** Google OAuth 2.0 client ID. Hook is a no-op when empty. */
    clientId: string;
    /**
     * Called with a Google credential suitable for backend verification.
     *
     * - **One Tap** returns an **ID token**.
     * - **Button click** uses OAuth popup and returns an **authorization code**.
     *
     * Your backend should verify/exchange this value for a session.
     */
    onCredential: (credential: string) => void;
    /** When true, shows One Tap prompt automatically after init. Default false. */
    enableOneTap?: boolean;
}
export interface UseGoogleAuthReturn {
    /**
     * Opens the Google sign-in popup (OAuth code flow).
     * Intended for use with a custom "Continue with Google" button.
     */
    loginWithGoogle: () => Promise<void>;
}
export declare function useGoogleAuth({ clientId, onCredential, enableOneTap, }: UseGoogleAuthOptions): UseGoogleAuthReturn;
export {};
