"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatNumber = void 0;
exports.toVND = toVND;
const formatNumber = (number, locale, option) => {
    var _a;
    return new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : 'VND', {
        ...option,
        currency: (_a = option === null || option === void 0 ? void 0 : option.currency) !== null && _a !== void 0 ? _a : 'VND',
    }).format(number);
};
exports.formatNumber = formatNumber;
function toVND(n) {
    return new Intl.NumberFormat('vi-VN', {
        style: 'currency',
        currency: 'VND',
        minimumFractionDigits: 0,
        maximumFractionDigits: 4,
    }).format(n);
}
//# sourceMappingURL=format-number.js.map