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/compact.mjs
/**
* Formats a numeric value using compact notation (e.g., 1K, 1M, 1B)
* based on locale and formatting options.
*
* @example
* compact({ value: 1200 }); // "1.2K"
*
* @example
* compact({ value: "1000000", locale: Locales.FRENCH, compactDisplay: "long" });
* // "1 million"
*/
const compact = (value, options) => new require_intl.CachedIntl.NumberFormat(options?.locale ?? require_built.built_default?.internationalization?.defaultLocale, {
	...options,
	notation: "compact"
}).format(Number(value));

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