function formatCurrency(value, options = {}) {
  const { currency = "USD", minimumFractionDigits = 0, maximumFractionDigits = 0 } = options;
  return new Intl.NumberFormat(void 0, {
    style: "currency",
    currency,
    minimumFractionDigits,
    maximumFractionDigits
  }).format(value);
}
function formatCurrencyWithDecimals(value, options = {}) {
  return formatCurrency(value, { minimumFractionDigits: 2, maximumFractionDigits: 2, ...options });
}
function formatCurrencyCompact(value, currencySymbol = "$") {
  if (Math.abs(value) >= 1e6) {
    return `${currencySymbol}${(value / 1e6).toFixed(1)}M`;
  }
  if (Math.abs(value) >= 1e3) {
    return `${currencySymbol}${(value / 1e3).toFixed(1)}K`;
  }
  return `${currencySymbol}${value.toFixed(0)}`;
}
function formatCurrencySafe(value, fallback = "--") {
  if (value === null || value === void 0) return fallback;
  const num = Number(value);
  if (!Number.isFinite(num)) return fallback;
  return formatCurrency(num);
}
export {
  formatCurrency,
  formatCurrencyCompact,
  formatCurrencySafe,
  formatCurrencyWithDecimals
};
//# sourceMappingURL=formatters.js.map
