type CurrencyPosition = "prefix" | "suffix";
interface MoneyFormatOptions {
    /**
     * Show currency symbol.
     *
     * @default true
     */
    symbol?: boolean;
    /**
     * Currency symbol or name.
     *
     * @default "៛"
     */
    currency?: string;
    /**
     * Decimal places.
     *
     * KHR formatting defaults to 0 because
     * Khmer Riel is treated as a whole-number currency.
     *
     * @default 0
     */
    decimals?: number;
    /**
     * Thousands separator.
     *
     * @default ","
     */
    separator?: string;
    /**
     * Decimal separator.
     *
     * @default "."
     */
    decimalSeparator?: string;
    /**
     * Currency position.
     *
     * @default "suffix"
     */
    currencyPosition?: CurrencyPosition;
    /**
     * Convert Arabic digits to Khmer digits.
     *
     * @default false
     */
    khmerDigits?: boolean;
    /**
     * Value returned for null, undefined or empty values.
     *
     * @default "0"
     */
    empty?: string;
    /**
     * Round KHR upward to the nearest unit.
     *
     * @default 100
     *
     * Example:
     *
     * 1000.01 -> 1100
     * 1050    -> 1100
     * 1100    -> 1100
     */
    roundTo?: number;
}
interface NumberFormatOptions {
    /**
     * Number of decimal places.
     *
     * @default 0
     */
    decimals?: number;
    /**
     * Thousands separator.
     *
     * @default ","
     */
    separator?: string;
    /**
     * Decimal separator.
     *
     * @default "."
     */
    decimalSeparator?: string;
    /**
     * Convert Arabic digits to Khmer digits.
     *
     * @default false
     */
    khmerDigits?: boolean;
    /**
     * Value returned for empty values.
     *
     * @default "0"
     */
    empty?: string;
}
interface KhmerLongFormatOptions extends MoneyFormatOptions {
    /**
     * Use Khmer digits.
     *
     * @default false
     */
    khmer?: boolean;
}

/**
 * Always rounds a KHR value upward
 * to the nearest configured unit.
 *
 * Example:
 *
 * 1000.01 -> 1100
 * 1050    -> 1100
 * 1099    -> 1100
 * 1100    -> 1100
 */
declare function ceilMoney(value: number, unit?: number): number;
/**
 * Format Khmer Riel.
 */
declare function formatKHR(value: unknown, options?: MoneyFormatOptions): string;
/**
 * Format an amount for text input.
 *
 * KHR values are rounded upward to the nearest
 * 100 Riel by default.
 */
declare function formatKHRInput(value: unknown, options?: MoneyFormatOptions): string;
/**
 * Format KHR using the long currency name.
 */
declare function formatKHRLong(value: unknown, options?: MoneyFormatOptions & {
    khmer?: boolean;
}): string;

/**
 * Parse a Khmer Riel formatted value.
 *
 * Supports:
 *
 * 10,000
 * 10,000 ៛
 * ៛10,000
 * ៛ 10,000
 * 10,000៛
 * ១០,០០០
 */
declare function parseKHR(value: unknown): number;
/**
 * Validate a money input.
 */
declare function isValidMoney(value: unknown): boolean;

declare function formatNumber(value: unknown, options?: NumberFormatOptions): string;
declare function parseNumber(value: unknown): number;

declare function toKhmerNumber(value: number | string): string;
declare function fromKhmerNumber(value: string): number;

/**
 * Convert a number to Khmer text.
 *
 * Example:
 *
 * 123 -> មួយរយម្ភៃបី
 */
declare function numberToKhmerText(value: number | string): string;
/**
 * Convert a decimal number to Khmer text.
 *
 * Example:
 *
 * 123.45
 * ->
 * មួយរយម្ភៃបីចុចបួនប្រាំ
 */
declare function decimalToKhmerText(value: number | string): string;
/**
 * Format KHR amount as Khmer text.
 *
 * Example:
 *
 * 10000 -> មួយម៉ឺនរៀល
 */
declare function numberToKhmerMoneyText(value: number | string): string;

export { type CurrencyPosition, type KhmerLongFormatOptions, type MoneyFormatOptions, type NumberFormatOptions, ceilMoney, decimalToKhmerText, formatKHR, formatKHRInput, formatKHRLong, formatNumber, fromKhmerNumber, isValidMoney, numberToKhmerMoneyText, numberToKhmerText, parseKHR, parseNumber, toKhmerNumber };
