import type { Hex } from 'viem'; import type { TransferTokenDefault } from '../../hooks/useTokenAndChainDropdown'; import type { FunkitActiveWithdrawalItem, MultiSourceWithdrawalConfig, SingleWithdrawalConfig } from '../../providers/FunkitCheckoutContext'; import type { SourceDropdownOption } from './WithdrawAmountInput'; import type { WithdrawalFormData } from './useWithdrawal'; /** The multi-source dropdown, as seen by the single-source form. */ export interface SourceSwitcher { options: SourceDropdownOption[]; selectedId: string; /** `receiveSelection` is what the current form shows, carried to the next. */ onSelect: (id: string, receiveSelection: ReceiveSelection) => void; } /** What the user picked on the receive side: where funds go and as what. */ export interface ReceiveSelection { recipientAddress: string; destination?: TransferTokenDefault; } /** * Resolves the picked source and everything the single-source form needs to * run it. `null` only for an empty container. */ export declare function useMultiSourceWithdrawal({ config, withdrawalItem, onContinue, }: { config: MultiSourceWithdrawalConfig; withdrawalItem: FunkitActiveWithdrawalItem | null; onContinue: (withdrawal: WithdrawalFormData, txHash: Hex, executedConfig: SingleWithdrawalConfig) => void; }): { sourceId: string; config: SingleWithdrawalConfig; withdrawalItem: { id: string; initSettings: Partial; withdrawalSourceTokenBalance: ((params: import("../../providers/FunkitCheckoutContext").WithdrawalSourceTokenBalanceParams) => string | number) | undefined; } | null; sourceSwitcher: { options: SourceDropdownOption[]; selectedId: string; onSelect: (id: string, receiveSelection: ReceiveSelection) => void; }; initialReceiveSelection: ReceiveSelection | undefined; onContinue: (withdrawal: WithdrawalFormData, txHash: Hex, executedConfig: SingleWithdrawalConfig) => void; } | null;