/// <reference types="react" />
import { ExchangeKeyEnum, ProviderEnum } from '@dynamic-labs/sdk-api-core';
import { SocialOAuthError, SocialOAuthErrorCode } from '@dynamic-labs/types';
import { PayWithDynamicProps } from '../usePayWithDynamic/usePayWithDynamic';
export type SocialAuthMode = 'link' | 'signin' | 'unlink';
type UseSocialAuthProps = {
    onSettled?: () => void;
    onError?: () => void;
    onFarcasterUrl?: (url: string) => void;
};
export type ConnectSocialAccountProps = {
    authMode: SocialAuthMode;
    provider: ProviderEnum;
    validator?: (provider: ProviderEnum) => boolean;
    captchaToken?: string;
    redirectUrl?: string;
    telegramAuthToken?: string;
    showWidgetAfterConnection?: boolean;
    forcePopup?: boolean;
    triggerFundFromExchangeOnSuccess?: ExchangeKeyEnum;
    payingWithDynamic?: PayWithDynamicProps;
    /** marks the flow as initiated by headless sign-in API */
    isHeadlessSocialSignIn?: boolean;
    /** SSO provider ID for social authentication */
    ssoProviderId?: string;
};
export declare const useSocialAuth: ({ onSettled, onError, onFarcasterUrl, }: UseSocialAuthProps) => {
    readonly checkValidProvider: (provider: ProviderEnum, authMode: SocialAuthMode) => boolean;
    readonly completeConnection: ({ authMode, provider, state, authCode, captchaToken, verifier, telegramAuthToken, forceCreateUser, ssoProviderId, }: {
        authMode: SocialAuthMode;
        provider: ProviderEnum;
        state: string;
        captchaToken?: string | undefined;
        authCode?: string | undefined;
        verifier?: string | undefined;
        telegramAuthToken?: string | undefined;
        forceCreateUser?: boolean | undefined;
        ssoProviderId?: string | undefined;
    }) => Promise<void>;
    readonly connectSocialAccount: (props: ConnectSocialAccountProps) => Promise<void>;
    readonly error: SocialOAuthError | undefined;
    readonly handleError: (provider: ProviderEnum | undefined, code: SocialOAuthErrorCode, message: string, options?: {
        raiseAuthFailure?: boolean | undefined;
    } | undefined) => void;
    readonly isProcessing: boolean;
    readonly setError: import("react").Dispatch<import("react").SetStateAction<SocialOAuthError | undefined>>;
    readonly setIsProcessing: import("react").Dispatch<import("react").SetStateAction<boolean>>;
};
export {};
