/** * Global Number Formatting Utility * * Converts and formats numeric values based on regional settings and custom parameters. * Supports currency and measure formats with locale-specific separators. * * @author CTT Design System * @version 1.0.0 */ export type FormatType = 'currency' | 'measure'; /** * Format a numeric value according to specified locale and format requirements * * @param value - The numeric value to format (number or string) * @param decimalPosition - Number of digits after the decimal/comma * @param format - Format type: 'currency' adds symbol, 'measure' without symbol * @param locale - Locale string (defaults to 'pt-PT') * @param currencySymbol - Currency symbol (defaults to '€' for currency format) * @returns Formatted string according to specified parameters * * @example * ```typescript * formatNumber(127878721, 2, 'measure') // → '127.878.721,00' * formatNumber(1278787.21, 2, 'currency') // → '€ 1.278.787,21' * formatNumber(1278787.21, 3, 'measure') // → '1.278.787,210' * formatNumber(1000000, 2, 'currency', 'en-US', '$') // → '$ 1,000,000.00' * ``` */ export declare function formatNumber(value: number | string, decimalPosition: number, format: FormatType, locale?: string, currencySymbol?: string): string; /** * Utility function to get common locale separators * Useful for components that need to know what separators are used */ export declare function getLocaleSeparators(locale?: string): { thousand: string; decimal: string; }; /** * Parse a formatted number string back to numeric value * Useful for components that need to convert user input back to numbers */ export declare function parseFormattedNumber(formattedValue: string, locale?: string): number; export default formatNumber;