/** * Orchestrates the Nado enter-amount screen: maps the selected symbol to a Nado * product, tracks the borrow toggle, and exposes the withdrawable amount + * sequencer fee in token units. * * - One-way dependency: never imports from `modals/`; WithdrawalContent maps * these outputs onto its own props. * - Every react-query call is a no-op (zero traffic) when the config isn't Nado. */ import { type NadoWithdrawalCustomerData } from '@funkit/connect-core/clients/nado'; import type { FunkitWithdrawalConfig } from '../../../providers/FunkitCheckoutContext'; /** Structurally matches the shared flow's `clientAmountToggle` (no modals import). */ export interface NadoAmountToggle { label: string; tooltip?: string; checked: boolean; onChange(enabled: boolean): void; } export interface UseNadoWithdrawalFormResult { isNado: boolean; /** Borrow (spot leverage) checkbox, assembled here so shared code holds no Nado state. */ amountToggle: NadoAmountToggle | undefined; /** * Balance the screen shows and the Max button fills: Nado's own * `max_withdrawable` with the fee added back. Borrowing can lift it above the * spot balance. */ withdrawableBalanceTokenUnits: string; /** Sequencer fee in the selected product's token units; hard 0 outside Nado. */ sequencerFeeTokenAmount: number; /** Same fee in USD for the breakdown's gas leg; 0 until the source price resolves. */ sequencerFeeUsd: number; /** USD price of the selected source token (stables short-circuit to 1); undefined while loading. */ sourceTokenUsdPrice: number | undefined; /** Submit-time customerData for the withdrawal callback; logs the decision. Undefined outside Nado. */ buildSubmitCustomerData(): NadoWithdrawalCustomerData | undefined; } export declare function useNadoWithdrawalForm(config: FunkitWithdrawalConfig | null, /** * The shared active dropdown item, by symbol. The product id is derived from * it — tracking a second copy here would leave two selections to keep in sync. */ selectedSourceToken: string | undefined): UseNadoWithdrawalFormResult;