export function useEurFormat(locale = 'sl-SI', currency = 'EUR') {
  const formatter = new Intl.NumberFormat(locale, {
    style: 'currency',
    currency,
    minimumFractionDigits: 2,
  });
  function formatEur(val) {
    if (val === null || val === undefined || val === '' || isNaN(val)) {
      return '—';
    }
    return formatter.format(Number(val));
  }
  return { formatEur };
}
