"use client";
function normalizeNumber(value, fallback = 0) {
  if (typeof value === "number" && Number.isFinite(value)) return value;
  if (typeof value === "string" && value.trim().length) {
    const parsed = Number(value);
    if (!Number.isNaN(parsed)) return parsed;
  }
  return fallback;
}
function formatMoney(value, currency) {
  if (!currency) return value.toFixed(2);
  return new Intl.NumberFormat(void 0, { style: "currency", currency }).format(value);
}
export {
  formatMoney,
  normalizeNumber
};
//# sourceMappingURL=lineItemUtils.js.map
