import { DateTimeFormat } from '../models/date-time-format';

export const DATE_TIME_FORMATS: Readonly<Record<DateTimeFormat, Intl.DateTimeFormatOptions>> =
  Object.freeze({
    [DateTimeFormat.Date]: Object.freeze({
      day: '2-digit',
      month: 'short',
      year: 'numeric'
    }),
    [DateTimeFormat.ShortDate]: Object.freeze({
      day: '2-digit',
      month: '2-digit',
      year: 'numeric'
    }),
    [DateTimeFormat.LongDate]: Object.freeze({
      weekday: 'long',
      day: '2-digit',
      month: 'long',
      year: 'numeric'
    }),
    [DateTimeFormat.DateTime]: Object.freeze({
      day: '2-digit',
      month: 'short',
      year: 'numeric',
      hour: '2-digit',
      minute: '2-digit',
      hour12: true
    }),
    [DateTimeFormat.ShortDateTime]: Object.freeze({
      day: '2-digit',
      month: '2-digit',
      year: 'numeric',
      hour: '2-digit',
      minute: '2-digit',
      hour12: true
    }),
    [DateTimeFormat.LongDateTime]: Object.freeze({
      weekday: 'long',
      day: '2-digit',
      month: 'long',
      year: 'numeric',
      hour: '2-digit',
      minute: '2-digit',
      second: '2-digit',
      hour12: true
    }),
    [DateTimeFormat.Time]: Object.freeze({
      hour: '2-digit',
      minute: '2-digit',
      hour12: true
    }),
    [DateTimeFormat.TimeWithSeconds]: Object.freeze({
      hour: '2-digit',
      minute: '2-digit',
      second: '2-digit',
      hour12: true
    }),
    [DateTimeFormat.MonthYear]: Object.freeze({
      month: 'long',
      year: 'numeric'
    }),
    [DateTimeFormat.Year]: Object.freeze({
      year: 'numeric'
    })
  });
