/** * Format a free-standing amount with the merchant's currency format settings. Use this for * amounts that are NOT tied to a model (remaining amount to free shipping, gift wrap threshold, * bulk discount limits, cart limit warnings). For model-bound prices, prefer the * `get*FormattedPrice` helpers — they call this function internally. * * Applies the merchant's `currencyFormats` entry for the given currency code (symbol, * symbolPosition, thousandSeparator, decimalSeparator, omitZeroDecimal). Behavior details: * always two decimal places, and a space between the symbol and the number. `omitZeroDecimal` * drops the fraction only when it is exactly `00`. * * Do NOT use `Intl.NumberFormat` for currency — it falls back to the browser locale and * produces a format that conflicts with platform-formatted prices on the same screen. * * @ai-category Pricing * @ai-related getProductVariantFormattedFinalPrice, getOrderLineItemFormattedFinalPrice, getIkasOrderFormattedTotalFinalPrice * * @param price - The amount to format * @param currencyCode - Currency code used to look up the merchant format settings (e.g. "TRY", "USD") * @param currencySymbol - Fallback symbol used when the merchant has no format entry for the code. * Always pass the symbol from the model you took the amount from (e.g. `cart.currencySymbol`) — * passing `null` can render the amount with no symbol at all. * @returns The amount formatted with the merchant's currency format (e.g. "₺ 1,950.00") * * @example * ```typescript * import { cartStore, formatCurrency } from "@ikas/bp-storefront"; * * function FreeShippingBar({ threshold }: { threshold: number }) { * const cart = cartStore.cart; * if (!cart) return null; * * const remaining = threshold - cart.totalFinalPrice; * if (remaining <= 0) return Free shipping unlocked!; * * return Add {formatCurrency(remaining, cart.currencyCode, cart.currencySymbol)} more for free shipping; * } * ``` */ export declare const formatCurrency: (price: number, currencyCode: string, currencySymbol: string | null) => string;