import type { PaymentDetails, PriceCurrency, PriceRecurring, TCoupon, TInvoiceExpanded, TLineItemExpanded, TPaymentCurrency, TPaymentCurrencyExpanded, TPaymentMethod, TPaymentMethodExpanded, TPrice, TProductExpanded, TSubscriptionExpanded, TSubscriptionItemExpanded } from '@blocklet/payment-types';
import { BN } from '@ocap/util';
import type { ActionProps, PricingRenderProps } from '../types';
export declare const PAYMENT_KIT_DID = "z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk";
/**
 * Format coupon discount terms for display
 */
export declare const formatCouponTerms: (coupon: TCoupon, currency: TPaymentCurrency, locale?: string) => string;
export declare const isPaymentKitMounted: () => any;
export declare const getPrefix: () => string;
export declare function isCrossOrigin(): boolean;
export declare function formatToDate(date: Date | string | number, locale?: string, format?: string): any;
export declare function formatToDatetime(date: Date | string | number, locale?: string): any;
export declare function formatTime(date: Date | string | number, format?: string, locale?: string): any;
export declare function formatDateTime(date: Date | string | number, locale?: string): any;
export declare const formatLocale: (locale?: string) => string;
export declare const formatPrettyMsLocale: (locale: string) => "zh_CN" | "en_US";
export declare const formatError: (err: any) => any;
export declare function formatBNStr(str?: string, decimals?: number, precision?: number, trim?: boolean, thousandSeparated?: boolean): string;
/**
 * Format credit amount for display (data contexts: balances, transactions, notifications)
 * - If currency has symbol mapping (USD -> $): shows "$20"
 * - If no symbol mapping: shows "20 minutes" or "20 arcsphere credits"
 *
 * @param formattedAmount - Already formatted amount string (e.g., "20", "1,000.50")
 * @param currencySymbol - Currency symbol (USD, EUR, minutes, etc.)
 * @param showUnit - Whether to show the unit (default: true)
 */
export declare function formatCreditAmount(formattedAmount: string, currencySymbol: string, showUnit?: boolean): string;
/**
 * Format credit amount for checkout/purchase scenarios
 * - If currency has symbol mapping (USD -> $): shows "$20 of credits" (en) or "$20 的信用额度" (zh)
 * - If no symbol mapping: shows "20 minutes" or "20 arcsphere credits"
 *
 * @param formattedAmount - Already formatted amount string (e.g., "20", "1,000.50")
 * @param currencySymbol - Currency symbol (USD, EUR, minutes, etc.)
 * @param locale - Locale for translation (default: 'en')
 * @param showUnit - Whether to show the unit (default: true)
 */
export declare function formatCreditForCheckout(formattedAmount: string, currencySymbol: string, locale?: string, showUnit?: boolean): string;
export declare function formatNumber(n: number | string, precision?: number, trim?: boolean, thousandSeparated?: boolean): string;
export declare function formatDynamicPrice(n: number | string, isDynamic: boolean, precision?: number, trim?: boolean, thousandSeparated?: boolean): string;
export declare function getUsdAmountFromBaseAmount(amount: string | number | undefined, quantity: number, scale?: number): string | null;
export declare function getUsdAmountFromTokenUnits(tokenAmount: BN | string, tokenDecimals: number, exchangeRate?: string | null): string | null;
export declare function formatUsdAmount(amount: string | null, locale?: string): string | null;
export declare function formatExchangeRate(amount: string | null): string | null;
/**
 * Format exchange rate with currency symbol for display
 * @param rate - The exchange rate value
 * @param currency - The currency code (default: 'USD')
 * @param decimals - Number of decimal places (default: 2, use 4 for live exchange rates)
 * @returns Formatted string like "$0.12" for USD, or "0.12 EUR" for other currencies
 */
export declare function formatExchangeRateDisplay(rate: string | number | null | undefined, currency?: string, decimals?: number): string | null;
export declare const formatPrice: (price: TPrice, currency: TPaymentCurrency, unit_label?: string, quantity?: number, bn?: boolean, locale?: string) => string;
export declare const formatPriceAmount: (price: TPrice, currency: TPaymentCurrency, unit_label?: string, quantity?: number, bn?: boolean, locale?: string) => string;
export declare function getStatementDescriptor(items: any[]): any;
export declare function formatRecurring(recurring: PriceRecurring, translate?: boolean, separator?: string, locale?: string): string;
export declare function getPriceUintAmountByCurrency(price: TPrice, currency: TPaymentCurrency): string;
export declare function getPriceCurrencyOptions(price: TPrice): PriceCurrency[];
export declare function getLineItemAmounts(item: TLineItemExpanded, currency: TPaymentCurrency, { useUpsell, exchangeRate }?: {
    useUpsell?: boolean;
    exchangeRate?: string | null;
}): {
    unitAmount: BN;
    totalAmount: BN;
    isDynamicQuote: boolean;
};
export type QuoteLockInfo = {
    baseAmount: string;
    baseCurrency: string;
    tokenAmount: string;
    tokenSymbol: string;
    expiresAt: number | null;
};
export declare function getQuoteLockInfo(items: TLineItemExpanded[], currency?: TPaymentCurrency | null): QuoteLockInfo | null;
export declare function formatLineItemPricing(item: TLineItemExpanded, currency: TPaymentCurrency, { trialEnd, trialInDays, exchangeRate, }: {
    trialEnd: number;
    trialInDays: number;
    exchangeRate?: string | null;
}, locale?: string): {
    primary: string;
    secondary?: string;
    quantity: string;
};
export declare function getSubscriptionStatusColor(status: string): "default" | "success" | "primary" | "warning" | "error";
export declare function getPaymentIntentStatusColor(status: string): "default" | "success" | "warning";
export declare function getRefundStatusColor(status: string): "default" | "success" | "warning";
export declare function getPayoutStatusColor(status: string): "default" | "success" | "warning";
export declare function getInvoiceStatusColor(status: string): "default" | "success" | "warning" | "secondary";
export declare function getWebhookStatusColor(status: string): "default" | "success";
export declare function getCheckoutAmount(items: TLineItemExpanded[], currency: TPaymentCurrency, trialing?: boolean, upsell?: boolean, { exchangeRate }?: {
    exchangeRate?: string | null;
}): {
    subtotal: any;
    total: any;
    renew: string;
    discount: string;
    shipping: string;
    tax: string;
};
export declare function getRecurringPeriod(recurring: PriceRecurring): number;
export declare function formatUpsellSaving(items: TLineItemExpanded[], currency: TPaymentCurrency): string;
export declare function formatMeteredThen(subscription: string, recurring: string, hasMetered: boolean, locale?: string): string;
export declare function formatThenValue(subscription: string, recurring: string, hasMetered: boolean, locale?: string): string;
export declare function formatPriceDisplay({ amount, then, actualAmount, showThen }: {
    amount: string;
    then?: string;
    actualAmount: string;
    showThen?: boolean;
}, recurring: string, hasMetered: boolean, locale?: string): string;
export declare function hasMultipleRecurringIntervals(items: TLineItemExpanded[]): boolean;
export declare function getFreeTrialTime({ trialInDays, trialEnd }: {
    trialInDays: number;
    trialEnd: number;
}, locale?: string): {
    count: number;
    interval: string;
};
export declare function formatCheckoutHeadlines(items: TLineItemExpanded[], currency: TPaymentCurrency, { trialInDays, trialEnd }: {
    trialInDays: number;
    trialEnd: number;
}, locale?: string, { exchangeRate }?: {
    exchangeRate?: string | null;
}): {
    action: string;
    amount: string;
    then?: string;
    thenValue?: string;
    secondary?: string;
    showThen?: boolean;
    actualAmount: string;
    priceDisplay: string;
};
export declare function formatAmount(amount: string, decimals: number, precision?: number): string;
export declare function findCurrency(methods: TPaymentMethodExpanded[], currencyId: string): TPaymentCurrencyExpanded | null;
export declare function isValidCountry(code: string): boolean;
export declare function stopEvent(e: React.SyntheticEvent<any>): void;
export declare function sleep(ms: number): Promise<unknown>;
export declare function formatSubscriptionProduct(items: TSubscriptionItemExpanded[], maxLength?: number): string;
export declare const getLineTimeInfo: (time: number, locale?: string) => {
    time: any;
    isToday: any;
};
export declare const getSubscriptionTimeSummary: (subscription: TSubscriptionExpanded, locale?: string) => {
    action: string;
    time: any;
    isToday: any;
} | null;
export declare const getSubscriptionAction: (subscription: TSubscriptionExpanded, actionProps: ActionProps) => {
    action: string;
    variant: string;
    color: string;
    canRenew: boolean;
    text?: string;
    sx?: any;
} | null;
export declare const mergeExtraParams: (extra?: Record<string, any>) => string;
export declare const flattenPaymentMethods: (methods?: TPaymentMethodExpanded[]) => TPaymentCurrency[];
export declare const getTxLink: (method: TPaymentMethod, details: PaymentDetails) => {
    link: string;
    text: string;
    gas: any;
};
export declare function getQueryParams(url: string): Record<string, string>;
export declare function lazyLoad(lazyRun: () => void): void;
export declare function formatTotalPrice({ product, quantity, priceId, locale, }: {
    product: TProductExpanded;
    quantity: number;
    priceId?: string;
    locale: string;
}): PricingRenderProps;
export declare function formatQuantityInventory(price: TPrice, quantity: string | number, locale?: string): string;
export declare function formatSubscriptionStatus(status: string): string;
export declare function formatAmountPrecisionLimit(amount: string, locale?: string, precision?: number): string;
export declare function getWordBreakStyle(value: any): 'break-word' | 'break-all';
export declare function isMobileSafari(): boolean;
export declare function truncateText(text: string, maxLength: number, useWidth?: boolean): string;
export declare function getCustomerAvatar(did: string | undefined, updated_at: string | number | undefined, imageSize?: number): string;
export declare function hasDelegateTxHash(details: PaymentDetails, paymentMethod: TPaymentMethod): any;
export declare function getInvoiceDescriptionAndReason(invoice: TInvoiceExpanded, locale?: string): {
    description: string | undefined;
    reason: string;
    type: string;
};
export declare function getPaymentKitComponent(): any;
export declare function openDonationSettings(openInNewTab?: boolean): void;
export declare function getUserProfileLink(userDid: string, locale?: string): string;
export declare function parseMarkedText(text: string): Array<{
    type: 'text' | 'marked';
    content: string;
}>;
export declare function getTokenBalanceLink(method: TPaymentMethod, address: string): string;
export declare function isCreditMetered(price: TPrice): boolean;
export declare function showStaking(method: TPaymentMethod, currency: TPaymentCurrency, noStake: boolean): boolean;
export declare function formatLinkWithLocale(url: string, locale?: string): string;
