/** * TagadaProvider - Main provider component for the Tagada Pay React SDK */ import { ReactNode } from 'react'; import { PluginConfig, RawPluginConfig } from '../hooks/usePluginConfig'; import { ApiService } from '../services/apiService'; import { AuthState, Currency, Customer, Environment, EnvironmentConfig, Locale, Session, Store } from '../types'; import { convertCurrency, formatMoney, formatMoneyWithoutSymbol, formatSimpleMoney, getCurrencyInfo, minorUnitsToMajorUnits, moneyStringOrNumberToMinorUnits } from '../utils/money'; interface TagadaContextValue { auth: AuthState; session: Session | null; customer: Customer | null; locale: Locale; currency: Currency; store: Store | null; environment: EnvironmentConfig; apiService: ApiService; isLoading: boolean; isInitialized: boolean; isSessionInitialized: boolean; debugMode: boolean; pluginConfig: PluginConfig; pluginConfigLoading: boolean; debugCheckout: { isActive: boolean; data: any; error: Error | null; isLoading: boolean; lastUpdated: Date | null; }; updateCheckoutDebugData: (data: any, error?: Error | null, isLoading?: boolean) => void; debugFunnel: { isActive: boolean; data: any; error: Error | null; isLoading: boolean; lastUpdated: Date | null; }; updateFunnelDebugData: (data: any, error?: Error | null, isLoading?: boolean) => void; refreshCoordinator: { registerCheckoutRefresh: (refreshFn: () => Promise) => void; registerOrderBumpRefresh: (refreshFn: () => Promise) => void; notifyCheckoutChanged: () => Promise; notifyOrderBumpChanged: () => Promise; unregisterCheckoutRefresh: () => void; unregisterOrderBumpRefresh: () => void; }; money: { formatMoney: typeof formatMoney; getCurrencyInfo: typeof getCurrencyInfo; moneyStringOrNumberToMinorUnits: typeof moneyStringOrNumberToMinorUnits; minorUnitsToMajorUnits: typeof minorUnitsToMajorUnits; formatMoneyWithoutSymbol: typeof formatMoneyWithoutSymbol; convertCurrency: typeof convertCurrency; formatSimpleMoney: typeof formatSimpleMoney; }; } interface TagadaProviderProps { children: ReactNode; environment?: Environment; customApiConfig?: Partial; debugMode?: boolean; localConfig?: string; blockUntilSessionReady?: boolean; rawPluginConfig?: RawPluginConfig; } export declare function TagadaProvider({ children, environment, customApiConfig, debugMode, // Remove default, will be set based on environment localConfig, blockUntilSessionReady, // Default to new non-blocking behavior rawPluginConfig, }: TagadaProviderProps): import("react/jsx-runtime").JSX.Element; export declare function useTagadaContext(): TagadaContextValue; export {};