import { type ReactNode } from 'react'; import { type ClipboardReader, type ClipboardWriter } from '../transfer/clipboard'; import type { DepositFlowCallbacks, DepositFlowConfig } from './depositFlowConfig'; import { type BackdropBlurRenderer } from './FlowSheet'; import type { WithdrawalFlowCallbacks, WithdrawalFlowConfig } from './withdrawalFlowConfig'; import type { StripeOnrampConfig } from '../fiat/providers/useStripeOnrampClient'; export type FlowScreen = 'depositAmount' | 'addMoney' | 'transfer' | 'swapped' | 'withdrawMethod' | 'withdrawAmount' | 'withdrawAddress' | 'withdrawReceiveToken' | 'withdrawComplete'; interface FunkitFlowContextValue { /** * Open the managed deposit flow. Resolves once the sheet is presenting. A * config that cannot open throws {@link FunkitMisconfiguredError} before any * promise exists, so `await beginDeposit()` and a bare call both see it at * the tap. */ beginDeposit: (config: DepositFlowConfig, callbacks?: DepositFlowCallbacks) => Promise; /** Open the managed withdrawal flow at the payout-method screen. */ beginWithdrawal: (config: WithdrawalFlowConfig, callbacks?: WithdrawalFlowCallbacks) => void; /** Close the flow. */ closeFlow: () => void; } export interface FlowNav { navigate: (s: FlowScreen) => void; back: () => void; /** Replace the whole stack with a single screen (never closes the sheet). */ reset: (s: FlowScreen) => void; /** * Pop back to `s`, however many screens deep it is — what `back` can't do once * a step lands between two that navigate to each other. A no-op when `s` isn't * on the stack. */ popTo: (s: FlowScreen) => void; closeFlow: () => void; } /** * Mounts the managed deposit-flow modal and exposes `beginDeposit` to * {@link useFunkitCheckout}. The five screens are rendered + navigated here * (host apps never render them directly), mirroring how `@funkit/connect`'s * `FunkitProvider` owns the checkout modal. */ export declare function FunkitFlowProvider({ children, copyToClipboard, pasteFromClipboard, renderBackdropBlur, liquidGlass, stripeOnramp, onOpenChange, }: { children: ReactNode; /** Host clipboard override; defaults to the bare-RN clipboard peer. */ copyToClipboard?: ClipboardWriter; /** Host clipboard-read override; defaults to the bare-RN clipboard peer. */ pasteFromClipboard?: ClipboardReader; /** Host replacement for the sheet material. See {@link BackdropBlurRenderer}. */ renderBackdropBlur?: BackdropBlurRenderer; /** Set with a replacement that is iOS 26 Liquid Glass rather than a blur. */ liquidGlass?: boolean; /** Stripe account config; the client is built from it here. */ stripeOnramp?: StripeOnrampConfig; /** * Fires on the closed→open and open→closed transitions, and again with * `true` when a `begin*` call replaces a flow that is already open. */ onOpenChange?: (isOpen: boolean) => void; }): import("react").JSX.Element; export declare function useFunkitFlow(): FunkitFlowContextValue; export {}; //# sourceMappingURL=FunkitFlowProvider.d.ts.map