import type { FormOfPaymentType } from '@funkit/api-base'; import { type SwappedBuyingCrypto, type SwappedTransport } from '@funkit/connect-core'; import React from 'react'; import { type SwappedTheme } from '../utils/swapped'; /** Deposit and withdrawal each own an independent Swapped iframe slot. */ export type SwappedMode = 'deposit' | 'withdrawal'; interface SwappedSlot { iframeUrl: string | null; isSwappedReady: boolean; isActive: boolean; setIframeUrl: (url: string | null) => void; activateIframe: (fopType: FormOfPaymentType) => void; deactivateIframe: () => void; resetIframe: () => void; setIframeRef: (el: HTMLIFrameElement | null) => void; focusAmountInput: () => void; swappedTransport: SwappedTransport; /** * Returns true the first time it's called for a given checkout id, false * afterward. Lives on the slot (not the step component) so it survives the * iframe step being unmounted/remounted as the user navigates back and * forth, while still resetting for a genuinely new checkout id. */ markIframeReadyFirst: (checkoutId: string) => boolean; } export declare function SwappedProvider({ children, buyingCrypto, }: { children: React.ReactNode; /** Destination token the deposit embed shows under the amount. */ buyingCrypto?: SwappedBuyingCrypto; }): React.JSX.Element; export declare function useSwappedContext(mode: SwappedMode): SwappedSlot; export declare function useSwappedTheme(): SwappedTheme; export {};