import type { ChainTypeEnum, OAuthProvider, SDKOverrides, ThirdPartyAuthConfiguration } from '@openfort/openfort-js'; import type React from 'react'; import type { Chain } from 'viem'; import type { useConnectCallbackProps } from '../../openfort/connectCallbackTypes'; import type { CustomTheme, Languages, Mode, Theme } from '../../types'; import type { BuyFormState, DebugModeOptions, OpenfortUIOptionsExtended, OpenfortWalletConfig, RouteOptions, SendFormState, SetRouteOptions } from './types'; type Connector = { id: string; type?: 'wallet'; } | { id: OAuthProvider; type: 'oauth'; }; export type ContextValue = { chainType: ChainTypeEnum; setChainType: (chainType: ChainTypeEnum) => void; setTheme: React.Dispatch>; mode: Mode; setMode: React.Dispatch>; setCustomTheme: React.Dispatch>; lang: Languages; setLang: React.Dispatch>; open: boolean; setOpen: (value: boolean) => void; route: RouteOptions; setRoute: (options: SetRouteOptions) => void; onBack: (() => void) | null; setOnBack: React.Dispatch void) | null>>; headerLeftSlot: React.ReactNode | null; setHeaderLeftSlot: React.Dispatch>; previousRoute: RouteOptions | null; setPreviousRoute: () => void; routeHistory: RouteOptions[]; setRouteHistory: React.Dispatch>; connector: Connector; setConnector: React.Dispatch>; debugMode: Required; resize: number; triggerResize: () => void; publishableKey: string; uiConfig: OpenfortUIOptionsExtended; walletConfig?: OpenfortWalletConfig; overrides?: SDKOverrides; thirdPartyAuth?: ThirdPartyAuthConfiguration; emailInput: string; setEmailInput: React.Dispatch>; phoneInput: string; setPhoneInput: React.Dispatch>; sendForm: SendFormState; setSendForm: React.Dispatch>; buyForm: BuyFormState; setBuyForm: React.Dispatch>; /** Configured EVM chains (from wagmi bridge or walletConfig.ethereum). Empty when not EVM. */ chains: Chain[]; } & useConnectCallbackProps; export declare const OpenfortContext: React.Context; /** * UI context value for modal control, navigation, and theme management. * This is an internal context used by OpenfortProvider. */ export interface UIContextValue { /** Whether the modal is open */ isOpen: boolean; /** Open the modal */ openModal: () => void; /** Close the modal */ closeModal: () => void; /** Current route in the modal */ currentRoute: RouteOptions; /** Navigate to a new route */ navigate: (route: SetRouteOptions) => void; /** Go back to the previous route */ goBack: () => void; /** Route history stack */ routeHistory: RouteOptions[]; /** Current theme */ theme: Theme; /** Current color mode */ mode: Mode; /** Update theme */ setTheme: (theme: Theme) => void; /** Update color mode */ setMode: (mode: Mode) => void; /** Form states */ forms: { send: SendFormState; buy: BuyFormState; }; /** Update send form state */ updateSendForm: (updates: Partial) => void; /** Update buy form state */ updateBuyForm: (updates: Partial) => void; /** Trigger a resize calculation */ triggerResize: () => void; } export declare const UIContext: React.Context; export {};