import { useTranslation } from "react-i18next";

const useWeekDays = (data: any) => {
  const { t } = useTranslation();

  const Sunday = [
    { day: "sunday", name: t("array.Days.Sunday"), order: 0 },
    ...(data?.data?.sunday || []),
  ];
  const Monday = [
    { day: "monday", name: t("array.Days.Monday"), order: 0 },
    ...(data?.data?.monday || []),
  ];
  const Tuesday = [
    { day: "tuesday", name: t("array.Days.Tuesday"), order: 0 },
    ...(data?.data?.tuesday || []),
  ];
  const Wednesday = [
    { day: "wednesday", name: t("array.Days.Wednesday"), order: 0 },
    ...(data?.data?.wednesday || []),
  ];
  const Friday = [
    { day: "friday", name: t("array.Days.Friday"), order: 0 },
    ...(data?.data?.friday || []),
  ];
  const Thursday = [
    { day: "thursday", name: t("array.Days.Thursday"), order: 0 },
    ...(data?.data?.thursday || []),
  ];
  const Saturday = [
    { day: "saturday", name: t("array.Days.Saturday"), order: 0 },
    ...(data?.data?.saturday || []),
  ];

  return { Sunday, Monday, Tuesday, Wednesday, Thursday, Saturday, Friday };
};

export default useWeekDays;
