const require_built = require('../config/dist/esm/built.cjs');
const require_intl = require('../utils/intl.cjs');

//#region ../react-intlayer/dist/esm/@intlayer/core/dist/esm/formatters/percentage.mjs
/**
* Formats a number as a percentage string (e.g., 0.25 → "25%").
*
* @example
* percentage({ value: 0.25 }) // "25%"
* percentage({ value: 0.25, minimumFractionDigits: 2 }) // "25.00%"
*/
const percentage = (value, options) => {
	let numericValue = Number(value);
	if (numericValue > 1) numericValue /= 100;
	return new require_intl.CachedIntl.NumberFormat(options?.locale ?? require_built.built_default?.internationalization?.defaultLocale, {
		style: "percent",
		...options
	}).format(Number(numericValue));
};

//#endregion
exports.percentage = percentage;
//# sourceMappingURL=percentage.cjs.map