import React from 'react'; import type { DepositAccess, PerpsTransferDirection, PolymarketPerpsTransferPending } from '../../providers/FunkitCheckoutContext/types'; import { type PerpsTransferAmountSelection } from './usePerpsTransferForm'; export type { PerpsTransferDirection }; /** * `pending` and `loading` can be derived by the form from transfer and balance * state. Explicit host-provided statuses are honored as well. */ export type PerpsTransferStatus = 'idle' | 'processing' | 'success' | 'error' | 'pending' | 'loading'; export interface PolymarketPerpsTransferScreenProps { /** Whether the modal is open. Defaults to true (the screen owns its Dialog). */ open?: boolean; /** Modal title. Defaults to the localized "Transfer". */ title?: string; /** Predictions account balance in USD. */ predictionsBalanceUsd: number; /** Perps account balance in USD. */ perpsBalanceUsd: number; /** Minimum pUSD to transfer *into* predictions (USD). Drives the * below-minimum notice when the destination is Predictions. */ predictionsMinTransferUsd?: number; /** Minimum pUSD to transfer *into* perps (USD). Drives the below-minimum * notice when the destination is Perps (e.g. perps' 5 pUSD minimum). */ perpsMinTransferUsd?: number; /** Initial transfer direction. Defaults to Predictions → Perps. */ initialDirection?: PerpsTransferDirection; /** Initial amount input string (pUSD). */ initialAmountUsd?: string; /** * Visual status, controlled by the host so the same screen renders the * idle / processing / success / error frames. `error` shows a retry-able * Transfer button with an error notice. No transfer logic is wired here — the * Transfer button simply reports clicks via {@link onTransfer}. */ status?: PerpsTransferStatus; /** * Message for the `error` frame. Replaces the generic error notice; omit it * to keep the generic notice. */ errorMessage?: string; /** * In-flight transfers reported by the host. While a deposit or withdrawal * is pending, Transfer is disabled and shows a pending state. */ pendingTransfers?: PolymarketPerpsTransferPending; /** * Fired when the (enabled) Transfer button is pressed, with the entered * amount and direction — mirrors {@link usePerpsTransferForm}'s callback * so a host receives everything it needs to perform the transfer. */ onTransfer: (params: { amountUsd: string; direction: PerpsTransferDirection; amountSelection: PerpsTransferAmountSelection | null; }) => void; onClose?: () => void; onBack?: () => void; /** Product destinations the current user is allowed to fund. */ access?: DepositAccess; } /** * Polymarket "Transfer" screen — moves a balance between the Predictions and * Perps accounts. Self-contained: it renders its own Dialog so it can be used * standalone or in a Storybook story. The in-checkout-modal variant is the * `PerpsTransferStep` (which renders the same UI via {@link usePerpsTransferForm} * as a registered step instead of a Dialog). * * UI only: balances are props, and the Transfer button's processing/success * states are driven by the {@link status} prop rather than any real transfer. */ export declare function PolymarketPerpsTransferScreen({ open, title, predictionsBalanceUsd, perpsBalanceUsd, predictionsMinTransferUsd, perpsMinTransferUsd, initialDirection, initialAmountUsd, status, errorMessage, pendingTransfers, onTransfer, onClose, onBack, access, }: PolymarketPerpsTransferScreenProps): React.JSX.Element;