import { ReactNode } from 'react';
import { DynamicClient } from '@dynamic-labs-sdk/client';
import { CountryIso2 } from 'react-international-phone';
import { LogLevel } from '@dynamic-labs/logger';
import { TokenBalance } from '@dynamic-labs/sdk-api-core';
import { type CoinbaseWalletPreference, type MobileExperience, type SocialProviderFilter, AuthMode } from '@dynamic-labs/types';
import { DeepLinkVariant, WalletConnectorExtension, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
import { LocaleResource } from '@dynamic-labs/locale';
import { AccessDeniedCustomButton, ChainToWalletMap, DynamicEventsCallbacks, RecommendedWallet, TransactionConfirmationSettings, WalletsFilter } from '../../../shared';
import { DynamicHandlers } from '../../../shared/types/dynamicHandlers';
import { SocialNetworkIconType } from '../../../utils/functions/getSocialNetworkIcon';
import { ThemeData, ThemeSetting } from '../../ThemeContext';
import { ChainsToConnect, NetworkValidationMode } from './IDynamicContext';
import { SettingsOverrides } from './SettingsOverrides';
import { SocialSettings } from './SocialSettings';
export interface DynamicContextProps {
    children: ReactNode;
    locale?: LocaleResource;
    /**
     * The DynamicClient instance to use for the DynamicContext.
     * If not provided, a new instance will be created.
     * @default undefined
     */
    client?: DynamicClient;
    settings: {
        accessDeniedButton?: AccessDeniedCustomButton;
        accessDeniedMessagePrimary?: string;
        accessDeniedMessageSecondary?: string;
        apiBaseUrl?: string;
        appLogoUrl?: string;
        appName?: string;
        bridgeChains?: ChainsToConnect[];
        coinbaseWalletPreference?: CoinbaseWalletPreference;
        /**
         * A nonce value for inline `<style>` and `<link>` tags injected by the SDK.
         * Required when using a strict Content Security Policy that disallows `unsafe-inline`.
         * The nonce must match the one specified in the CSP `style-src` directive.
         */
        cspNonce?: string;
        cssOverrides?: string | JSX.Element;
        customPrivacyPolicy?: ReactNode;
        defaultPhoneInputIso2?: CountryIso2;
        /**
         * If true, users will see a prompt to link the wallet
         * when an account change is detected in the wallet connector
         * and the newly selected wallet is not linked yet
         * @default false
         */
        detectNewWalletsForLinking?: boolean;
        customTermsOfServices?: ReactNode;
        debugError?: boolean;
        /**
         * Used to control the type of deep link used when connecting
         * a mobile wallet. Defaults to 'native'. This is useful for
         * example if your app is running in a webview of a native
         * mobile app, and you want to be able to link out to any
         * wallet without having to modify your iOS build config.
         * In this case, you can set this to 'universal'.
         */
        deepLinkPreference?: DeepLinkVariant;
        defaultNumberOfWalletsToShow?: number;
        displaySiweStatement?: boolean;
        enableConnectOnlyFallback?: boolean;
        enableVisitTrackingOnConnectOnly?: boolean;
        environmentId: string;
        events?: DynamicEventsCallbacks;
        /**
         * @deprecated Set flow network in dashboard instead
         */
        flowNetwork?: 'testnet' | 'mainnet';
        handlers?: DynamicHandlers;
        initialAuthenticationMode?: AuthMode;
        localStorageSuffix?: string;
        /**
         * The log level to use for client side logging with our SDK
         * @default WARN
         */
        logLevel?: keyof typeof LogLevel;
        mobileExperience?: MobileExperience;
        networkValidationMode?: NetworkValidationMode;
        newToWeb3WalletChainMap?: ChainToWalletMap;
        notInTheListImageUrl?: string;
        onboardingImageUrl?: string;
        overrides?: SettingsOverrides;
        social?: SocialSettings;
        policiesConsentInnerComponent?: ReactNode | ReactNode[];
        privacyPolicyUrl?: string;
        recommendedWallets?: RecommendedWallet[];
        redirectUrl?: string;
        siweStatement?: string;
        shadowDOMEnabled?: boolean;
        showLockedWalletView?: boolean;
        socialMediaIconUrl?: Record<string, string> | Record<SocialNetworkIconType, string>;
        socialMediaLinkText?: string;
        socialMediaUrl?: string;
        socialProvidersFilter?: SocialProviderFilter;
        suppressEndUserConsoleWarning?: boolean;
        termsOfServiceUrl?: string;
        walletConnectors?: WalletConnectorsMethod[];
        walletConnectorExtensions?: WalletConnectorExtension[];
        walletConnectPreferredChains?: `eip155:${number}`[];
        walletsFilter?: WalletsFilter;
        /**
         * Allows filtering which tokens show in the expanded tokens view.
         * Hidden tokens will not count towards the user's total balance.
         */
        tokensFilter?: (tokens: TokenBalance[]) => TokenBalance[];
        /**
         * Controls the device registration modal behavior.
         * When set to { enabled: false }, the SDK will not automatically show the
         * device registration modal. Customers can build their own headless experience
         * using `isDeviceRegistrationRequired` from @dynamic-labs-sdk/client.
         * @default { enabled: true }
         */
        deviceRegistrationModal?: {
            enabled: boolean;
        };
        transactionConfirmation?: TransactionConfirmationSettings;
        /**
         * If true, the Metamask SDK will be used to connect to the wallet.
         * If false, the injected eip6963 provider will be used and WalletConnect for mobile.
         * @default true
         */
        useMetamaskSdk?: boolean;
    };
    theme?: ThemeData | ThemeSetting;
    /**
     * Emit errors to Dynamic API for debugging purposes
     * @default true
     */
    emitErrors?: boolean;
    /**
     * Emit performance logs to Dynamic API for performance analysis
     * @default false
     */
    enableInstrumentation?: boolean;
}
