const i = (r, o = {}) => {
  const {
    locale: n = "de-DE",
    currency: c = "EUR",
    numberOfDecimals: t = 2
  } = o, e = {
    style: "currency",
    currency: c,
    minimumFractionDigits: t,
    maximumFractionDigits: t
  };
  try {
    return new Intl.NumberFormat(n, e).format(r ?? 0);
  } catch {
    return new Intl.NumberFormat("de-DE", e).format(r ?? 0);
  }
};
export {
  i as formatNumberWithCurrency
};
