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/units.mjs
/**
* Formats a numeric value as a localized unit string.
*
* @example
* units({ value: 5, unit: "kilometer", unitDisplay: "long", locale: "en-GB" })
* // "5 kilometers"
*/
const units = (value, options) => new require_intl.CachedIntl.NumberFormat(options?.locale ?? require_built.built_default?.internationalization?.defaultLocale, {
	style: "unit",
	unit: options?.unit ?? "day",
	unitDisplay: options?.unitDisplay ?? "short",
	useGrouping: options?.useGrouping ?? false
}).format(Number(value));

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