import { TPeriod, TTranslations } from '../types';

export const period = ({ day, month, week }: TTranslations): TPeriod => [
  { label: day, value: 'day' },
  { label: week, value: 'week' },
  { label: month, value: 'month' },
];

export const monthPeriod = ({
  january,
  february,
  march,
  april,
  may,
  june,
  july,
  august,
  september,
  october,
  november,
  december,
}: TTranslations): TPeriod => [
  { label: january, value: 'january' },
  { label: february, value: 'february' },
  { label: march, value: 'march' },
  { label: april, value: 'april' },
  { label: may, value: 'may' },
  { label: june, value: 'june' },
  { label: july, value: 'july' },
  { label: august, value: 'august' },
  { label: september, value: 'september' },
  { label: october, value: 'october' },
  { label: november, value: 'november' },
  { label: december, value: 'december' },
];

export const weekPeriod = ({
  friday,
  monday,
  saturday,
  sunday,
  thursday,
  tuesday,
  wednesday,
}: TTranslations): TPeriod => [
  { label: sunday, value: 'sunday' },
  { label: monday, value: 'monday' },
  { label: tuesday, value: 'tuesday' },
  { label: wednesday, value: 'wednesday' },
  { label: thursday, value: 'thursday' },
  { label: friday, value: 'friday' },
  { label: saturday, value: 'saturday' },
];
