import { getAgendaSettingsList } from "@/service/agenda-setting/agenda-setting";
import { faker } from "@faker-js/faker";
import dayjs from "dayjs";

const date = new Date();
const prevDay = new Date().getDate() - 1;
const nextDay = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
const INITIAL_YEAR = dayjs().format("YYYY");
const INITIAL_MONTH = dayjs().format("M");

// prettier-ignore
const nextMonth = date.getMonth() === 11 ? new Date(date.getFullYear() + 1, 0, 1) : new Date(date.getFullYear(), date.getMonth() + 1, 1)
// prettier-ignore
const prevMonth = date.getMonth() === 11 ? new Date(date.getFullYear() - 1, 0, 1) : new Date(date.getFullYear(), date.getMonth() - 1, 1)

export const calendarEvents = [
  {
    id: faker.string.uuid(),
    title: "aaaAll Day Event",
    start: date,
    end: nextDay,
    allDay: false,
    //className: "warning",
    extendedProps: {
      calendar: "polda",
    },
  },
  {
    id: faker.string.uuid(),
    title: "Meeting With Client",
    start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
    end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
    allDay: true,
    //className: "success",
    extendedProps: {
      calendar: "national",
    },
  },
  {
    id: faker.string.uuid(),
    title: "Lunch",
    allDay: true,
    start: new Date(date.getFullYear(), date.getMonth() + 1, -9),
    end: new Date(date.getFullYear(), date.getMonth() + 1, -7),
    // className: "info",
    extendedProps: {
      calendar: "polres",
    },
  },
  {
    id: faker.string.uuid(),
    title: "Birthday Party",
    start: new Date(date.getFullYear(), date.getMonth() + 1, -11),
    end: new Date(date.getFullYear(), date.getMonth() + 1, -10),
    allDay: true,
    //className: "primary",
    extendedProps: {
      calendar: "polres",
    },
  },
  {
    id: faker.string.uuid(),
    title: "Birthday Party",
    start: new Date(date.getFullYear(), date.getMonth() + 1, -13),
    end: new Date(date.getFullYear(), date.getMonth() + 1, -12),
    allDay: true,
    // className: "danger",
    extendedProps: {
      calendar: "polda",
    },
  },
  {
    id: faker.string.uuid(),
    title: "Monthly Meeting",
    start: nextMonth,
    end: nextMonth,
    allDay: true,
    //className: "primary",
    extendedProps: {
      calendar: "international",
    },
  },
];

export const calendarCategories = [
  {
    label: "Nasional",
    value: "mabes",
    activeClass: "ring-primary-500 bg-primary-500",
    className: "group-hover:border-blue-500",
  },
  {
    label: "Polda",
    value: "polda",
    activeClass: "ring-success-500 bg-success-500",
    className: " group-hover:border-green-500",
  },
  {
    label: "Polres",
    value: "polres",
    activeClass: "ring-danger-500 bg-danger-500",
    className: " group-hover:border-red-500",
  },
  {
    label: "Satker",
    value: "satker",
    activeClass: "ring-yellow-500 bg-yellow-500",
    className: " group-hover:border-red-500",
  },
  {
    label: "Internasional",
    value: "international",
    activeClass: "ring-info-500 bg-info-500",
    className: " group-hover:border-cyan-500",
  },
];

export const categories = [
  {
    label: "Nasional",
    value: "mabes",
    className:
      "data-[state=checked]:bg-yellow-500 data-[state=checked]:ring-yellow-500",
  },
  {
    label: "Polda",
    value: "polda",

    className:
      "data-[state=checked]:bg-blue-400 data-[state=checked]:ring-blue-400",
  },
  {
    label: "Polres",
    value: "polres",
    className:
      "data-[state=checked]:bg-slate-400  data-[state=checked]:ring-slate-400 ",
  },
  {
    label: "Satker",
    value: "satker",
    className:
      "data-[state=checked]:bg-warning  data-[state=checked]:ring-warning ",
  },
  {
    label: "Internasional",
    value: "international",
    className:
      "data-[state=checked]:bg-green-500 data-[state=checked]:ring-green-500 ",
  },
];

export type CalendarEvent = (typeof calendarEvents)[number];
export type CalendarCategory = (typeof calendarCategories)[number];
export type Category = (typeof categories)[number];
