import { type SwappedFormOfPayment } from '@funkit/api-base'; import React from 'react'; import type { Hex } from 'viem'; import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodBitcoinLightningInfo, type PaymentMethodCardInfo, type PaymentMethodCashAppLightningInfo, type PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods'; import type { FunkitCheckoutQuoteResult } from '../../../domains/quote'; import { type PaymentMethodType } from '../../../hooks/usePaymentSources'; import { type MultiSourceWithdrawalConfig, type SingleWithdrawalConfig } from '../../../providers/FunkitCheckoutContext'; import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared'; import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition'; import type { SwappedMode } from '../../../providers/SwappedProvider'; export type SourceChangeState = CheckoutModalCommonState & { paymentMethodInfo: ConnectablePaymentMethodInfo | null; /** Persisted payment method type filter (crypto/fiat tab) */ paymentMethodTypeFilter?: PaymentMethodType; /** * Resolved single-method withdrawal config, seeded while the Withdraw tab is * open so the modal-level effect in `FunCheckoutModal` can enter withdrawal * mode in lockstep with the tab — the withdraw tab may render withdrawal-mode * UI while still on SourceChange. Cleared when leaving the tab so the effect * reverts back to deposit mode. Read only by that effect. */ withdrawalConfig?: SingleWithdrawalConfig | MultiSourceWithdrawalConfig; }; export type SourceChangeNext = { connectNew: false; paymentMethodInfo: ConnectablePaymentMethodInfo; } | { connectNew: true; paymentMethod: Exclude; } | { connectNew: true; paymentMethod: PaymentMethod.BITCOIN_LIGHTNING; paymentMethodInfo: PaymentMethodBitcoinLightningInfo; } | { connectNew: true; paymentMethod: PaymentMethod.CASH_APP_LIGHTNING; paymentMethodInfo: PaymentMethodCashAppLightningInfo; } | { connectNew: true; paymentMethod: PaymentMethod.VIRTUAL_BANK; paymentMethodInfo: PaymentMethodVirtualBankIncompleteInfo; } | { connectNew: true; paymentMethod: PaymentMethod.CARD; paymentMethodInfo: PaymentMethodCardInfo; } | { /** Navigate to Swapped iframe with a selected payment option */ swappedIframe: true; selectedPaymentOption: SwappedFormOfPayment; /** Payment method type filter to restore when returning */ paymentMethodTypeFilter: PaymentMethodType; /** Slot/origin for the shared Swapped iframe step */ swappedMode: SwappedMode; } | { /** * Skip the asset-select screen; land on InputAmount with the * source asset pre-set on the checkout context. Used by the * Native fast-path row. */ skipAssetSelect: true; paymentMethodInfo: ConnectablePaymentMethodInfo; } | { /** Open the V2 checkout with FiatV2 from its picker row. */ fiatV2: true; } | { /** Enter the cashier withdrawal flow with a resolved single-method config. */ withdraw: true; withdrawalConfig: SingleWithdrawalConfig | MultiSourceWithdrawalConfig; } | { /** * Inline withdrawal (swapped-withdrawal flag off): the amount form is * rendered directly in the Withdraw tab, so on success we jump straight * to the completion screen rather than through WITHDRAWAL_ENTER_AMOUNT. */ withdrawComplete: true; /** The source that ran — the picked one on a multi-source config. */ executedConfig: SingleWithdrawalConfig; hash: Hex; withdrawnAmount: string; tokenSymbol: string; quote?: FunkitCheckoutQuoteResult; }; export declare const SourceChangeInfo: ModalStepInfo; export declare function SourceChange({ modalState, onClose, onNext, onStepChange, setModalState, }: ModalStepComponentProps): React.JSX.Element;