import type { ErrorNotification } from '../../../components/FunNotification/FunNotification'; import type { useFunkitTranslation } from '../../../hooks/useFunkitTranslation'; import type { AmountInputError, AmountSelectionType } from './state'; type TFunction = ReturnType['t']; export declare const ASSET_DECIMALS = 5; export declare const USD_DECIMALS = 2; export declare const USD_INITIAL_AMOUNT = 100; export declare function getDefaultAmountFromQuickOptions(quickOptions: number[] | undefined): number | undefined; export declare function getUsdMaxAmount(maxUsd: number): number | null; export declare function getUsdMinAmount(minUsd?: number): number; /** * Format numeric percentage and fixed-fiat quick-option labels consistently * for display and analytics. The 100% balance option is rendered separately * as the localized Max label. */ export declare function formatQuickOptionPresetAmount(option: number, percentMode: boolean, fiatCurrency: string, t: TFunction): string; export interface InputAmountSuggestion { autoConfirm: boolean; buttonLabel: string; /** select_type to report for this recovery action; preset_amount is always null alongside it. */ selectType: Extract; usdAmount: number; } /** * Get suggested amount from error * Allow recovery actions to user in the CTA Continue button */ export declare const getInputAmountSuggestion: (error: AmountInputError | null, t: TFunction) => InputAmountSuggestion | undefined; export declare const getInputErrorNotification: (error: AmountInputError | null, t: TFunction) => ErrorNotification | undefined; export type NumberSeparators = { decimalSeparator: string; groupSeparator: RegExp; }; export declare function getNumberSeparators(locale: Intl.LocalesArgument): NumberSeparators; export declare function parseNumberInputValue(inputValue: string, separators: NumberSeparators): { amount: number | undefined; amountString: string; amountStringNormalized: string; decimalPart: string | null; integerPart: string; }; export declare function getCurrencyFormattingOptions(fiatCurrency: string, locale: Intl.LocalesArgument): { currencySymbol: string; currencySymbolWithSpacing: string; decimals: number; }; export declare function formatAssetAmountWithLocale(value: number, options: { locale: Intl.LocalesArgument; }): string; export declare function formatCurrencyAmountWithLocale(value: number, options: { fiatCurrency: string; locale: Intl.LocalesArgument; }): string; /** * Canonical fiat display formatter for the InputAmount UI. * * Combines our decimal rules with the utility library's suffix abbreviations: * - Adds locale-aware currency symbol prefix (e.g. `$` for USD, `Kč ` for CZK) * - Min 2, max ASSET_DECIMALS decimal places — trailing zeros trimmed beyond minimum * - Thousands separators (e.g. `$1,234.00`) * - M / B / T suffix abbreviation for amounts ≥ 1,000,000 (e.g. `$1.23M`) * * State-stored fiatAmounts are already floor-rounded to ASSET_DECIMALS precision, * so this function does not apply additional rounding. * * Note: the suffix path (≥ 1M) always uses USD `$` — acceptable since only USD * is currently supported in this flow. */ export declare function formatFiatAmountAndStringify(value: number, options: { fiatCurrency: string; locale: Intl.LocalesArgument; }): string; export declare function replaceStringRange(original: string, replacement: string, start: number, end: number): string; export declare function reformatDecimalPart(decimalPart: string, decimals: number): string; export declare function reformatIntegerPart(integerPart: string, locale: Intl.LocalesArgument, preserveLeadingZeroes: boolean): string; export {};