export interface VenueBalance {
    venue: string;
    balance: number;
    shortfall?: number;
}
export type DepositMethod = "wallet" | "crypto" | "card";
export interface DepositFlowOption {
    id: string;
    title: string;
    description: string;
    value?: string;
    highlighted?: boolean;
}
export interface DepositSelectOption {
    value: string;
    label: string;
    iconUrl?: string;
    icon?: React.ReactNode;
}
export interface WalletProcessingStep {
    id: string;
    label: string;
    status: "complete" | "active" | "pending";
}
export type WalletTransactionStatus = "submitted" | "confirming" | "settled" | "error";
export interface WalletDepositSummary {
    amountReceived: string;
    network: string;
    fromWallet: string;
    gasFee: string;
}
/** Parameters passed to `onConfirmWalletDeposit`. */
export interface WalletDepositConfirmParams {
    /** Resolved deposit address — EVM (0x…) or SVM (Base58) based on selected network. */
    address: string;
    amount: string;
    chainId: number;
    token: string;
}
/** Partner-provided wallet context. Network/token selection is managed internally. */
export interface WalletDepositFlowData {
    /** Platform balance shown on the method-selection screen. */
    balance: number;
    /** Connected wallet label shown in the form header, e.g. "3XzH…ULM9". */
    walletLabel: string;
    /** Wallet's current fiat balance used for amount validation. */
    walletBalance: number;
    /** Whether the wallet balance is currently being fetched. */
    isWalletBalanceLoading?: boolean;
    /** Controlled amount string. */
    amount: string;
    /** Optional inline error shown on the wallet form. */
    formErrorMessage?: string;
    /** Visual tone for the inline wallet form error. */
    formErrorTone?: "warning" | "error";
    /** Optional estimate row shown below the amount input. */
    estimatedReceive?: string;
    feeEstimate?: string;
    eta?: string;
    /**
     * Processing steps shown during deposit.
     * Defaults to the standard 2-step submit/confirmation flow when omitted.
     */
    processingSteps?: WalletProcessingStep[];
    /**
     * Optional transaction status for driving the processing screen from a real
     * wallet broadcast/confirmation flow. When omitted, the modal stays on the
     * confirmation state until the caller updates the flow or closes the modal.
     */
    transactionStatus?: WalletTransactionStatus;
    /** Optional processing error copy shown when transactionStatus is "error". */
    transactionErrorMessage?: string;
    /**
     * Success summary shown on the final screen.
     * Defaults are derived from the deposit context (amount, network, wallet label).
     * Provide `gasFee` here once known from the transaction receipt.
     */
    successSummary?: Partial<WalletDepositSummary>;
}
/** Optional config for the "Send crypto" tab. Fee estimates are derived from the shared estimator. */
export interface SendCryptoConfig {
    minDeposit?: string;
    /** @deprecated Send crypto now derives fees from the shared transfer estimator. */
    feeEstimate?: string;
    eta?: string;
}
export interface CardProviderOption {
    id: string;
    name: string;
    quote: string;
    fee: string;
    badge?: "best" | "low-kyc";
    highlighted?: boolean;
}
export interface CardPurchaseSummary {
    amountReceived: string;
    network: string;
    fees: string;
}
export interface CardFlowData {
    amount: string;
    currency: string;
    tokenOptions: DepositSelectOption[];
    /** Optional override list. Falls back to {@link CARD_NETWORK_OPTIONS}. */
    networkOptions?: DepositSelectOption[];
    selectedToken: string;
    selectedNetwork: string;
    providers: CardProviderOption[];
    selectedProviderId?: string;
    purchaseSummary: CardPurchaseSummary;
    /** Minimum deposit amount in the selected currency. Shown as validation hint. */
    minAmount?: number;
}
export interface DepositModalControlledProps {
    open: boolean;
    /** Called whenever the deposit modal open state changes. */
    onOpenChange: (open: boolean) => void;
    /** Controlled wallet-flow state used by the wallet deposit tab. */
    walletFlow: WalletDepositFlowData;
    /** Called when the wallet deposit amount changes. */
    onWalletAmountChange: (amount: string) => void;
    /** Called when the wallet flow should use the maximum available amount. */
    onWalletMax: () => void;
    /**
     * Called when the user confirms a wallet deposit.
     * Receives the resolved deposit address and amount so the caller can
     * submit the on-chain transaction. Return a promise — the modal waits
     * before advancing to the processing screen.
     */
    onConfirmWalletDeposit?: (params: WalletDepositConfirmParams) => Promise<void> | void;
    /** Called after the wallet deposit flow reaches its completion state. */
    onDoneWalletDeposit?: () => void;
    /**
     * Called when the user backs out of the wallet processing screen — e.g.
     * after a wallet popup was dismissed silently or an in-flight tx was
     * canceled/replaced from the wallet UI without a clean error. The hook
     * implementation should clear any pending transaction state so a retry
     * starts fresh. The modal handles returning to the wallet form on its own.
     */
    onCancelWalletDeposit?: () => void;
    /**
     * Fired whenever the wallet-flow network dropdown changes (including the
     * initial auto-select). The parent can use this to read the on-chain
     * balance for the selected chain and update `walletFlow.walletBalance`.
     */
    onWalletNetworkChange?: (chainId: string) => void;
    /**
     * Fired whenever the wallet-flow token dropdown changes (including the
     * initial auto-select after a network switch). Use together with
     * `onWalletNetworkChange` to read the on-chain balance for the
     * selected token and update `walletFlow.walletBalance`.
     */
    onWalletTokenChange?: (tokenSymbol: string) => void;
    /**
     * If provided, the wallet-flow network dropdown will prefer this chain
     * on first render (e.g. pass the wallet's connected chainId so the
     * dropdown and balance are in sync immediately).
     */
    initialWalletChainId?: string;
    /**
     * Set when exactly one external wallet kind is connected. When provided,
     * the wallet flow filters its network options to chains compatible with
     * that wallet (and hides the network selector if only one option remains).
     * Leave undefined to show all chains.
     */
    connectedWalletKind?: "evm" | "solana";
    /** Static config for the "Send crypto" tab (min deposit, fee, ETA). */
    sendCryptoConfig?: SendCryptoConfig;
    /** Called after the send-crypto flow reaches its completion state. */
    onDoneSendCrypto?: () => void;
    /** Optional controlled state for the card deposit flow. */
    cardFlow?: CardFlowData;
    /** Called when the user selects a deposit method tab. */
    onSelectDepositMethod?: (method: DepositMethod) => void;
    /** Called when the card deposit flow continues after amount entry. */
    onContinueCardDeposit?: (amount: number) => void;
    /** Called after the crypto transfer flow completes. */
    onDoneCryptoTransfer?: () => void;
    /** Called when the card deposit amount changes. */
    onCardAmountChange?: (amount: string) => void;
    /** Called when the source fiat currency changes. */
    onCardCurrencyChange?: (currency: string) => void;
    /** Called when the destination token changes. */
    onCardTokenChange?: (token: string) => void;
    /** Called when the destination network changes. */
    onCardNetworkChange?: (network: string) => void;
    /** Called when the user selects a ramp provider. */
    onSelectCardProvider?: (providerId: string) => void;
    /** Called after the card purchase flow completes. */
    onDoneCardPurchase?: () => void;
    /**
     * Optional side-effect hook fired when the user clicks "View Activity" on
     * the payment-pending screen. The modal then redirects to `/profile?tab=activity`
     * regardless. Use this for analytics or partner-side teardown.
     */
    onViewActivity?: () => void;
    /** URL to redirect the user to after the ramp widget transaction completes. */
    cardRedirectUrl?: string;
    /** Called when user clicks "Get Quotes". Should fetch ramp quotes and return CardProviderOption[]. */
    onGetCardQuotes?: (params: {
        /** Amount entered in the source fiat currency. */
        sourceAmount: string;
        /** ISO currency code for the fiat source amount. */
        sourceCurrencyCode: string;
        /** Destination token or currency code requested from providers. */
        destinationCurrencyCode: string;
    }) => Promise<CardProviderOption[]>;
    /** Called when user selects a provider. Should create an ramp session and return the widget URL. */
    onCreateCardSession?: (params: {
        /** Identifier of the selected ramp provider. */
        serviceProvider: string;
        /** Amount entered in the source fiat currency. */
        sourceAmount: string;
        /** ISO currency code for the fiat source amount. */
        sourceCurrencyCode: string;
        /** Destination token or currency code requested from providers. */
        destinationCurrencyCode: string;
        /** Wallet address that should receive the purchased asset. */
        walletAddress: string;
        /** Optional redirect URL used after the provider flow completes. */
        redirectUrl?: string;
    }) => Promise<{
        id: string;
        widgetUrl: string;
        serviceProviderWidgetUrl: string;
    }>;
    /** Poll card transaction status by session ID. Return the status string. */
    onGetCardTransactionStatus?: (sessionId: string) => Promise<CardTransactionStatus>;
    /**
     * When set, the modal opens directly in the card success screen.
     * Used to resume after a redirect from the payment provider.
     */
    pendingCardPurchaseSummary?: CardPurchaseSummary | null;
}
export interface DepositModalSelfDrivenProps {
    open: boolean;
    onOpenChange: (open: boolean) => void;
}
export type DepositModalProps = DepositModalControlledProps | DepositModalSelfDrivenProps;
export interface CardTransactionStatus {
    status: "pending" | "settling" | "settled" | "error" | "unknown";
}
