export const PERSIAN_MONTHS = [
  "فروردین",
  "اردیبهشت",
  "خرداد",
  "تیر",
  "مرداد",
  "شهریور",
  "مهر",
  "آبان",
  "آذر",
  "دی",
  "بهمن",
  "اسفند",
];

export const API_URL = "http://localhost:3500/api/v1";
export const API_CDN_URL = "http://localhost:4000";
export const STAFF_ROLE = ["developer", "admin", "coordinator", "doctor"];
export type STAFF_ROLE_TYPE = "ADMIN" | "DOCTOR" | "DEVELOPER" | "COORDINATOR";
export const ROLES = Object.freeze({
  developer: "DEVELOPER",
  admin: "ADMIN",
  coordinator: "COORDINATOR",
  doctor: "DOCTOR",
});
export interface SIDE_MENU_TYPE {
  id: number;
  label: string;
  href: string;
  sub: {
    items: {
      id: number;
      label: string;
      hasLine: boolean;
      href: string;
      show?: boolean;
      roles?: STAFF_ROLE_TYPE[];
    }[];
  } | null;
  icon: string;
  roles?: STAFF_ROLE_TYPE[];
}

export const SIDE_MENUS: SIDE_MENU_TYPE[] = [
  {
    id: 1,
    label: "پیشخوان",
    href: "/dashboard",
    sub: null,
    icon: "LayoutDashboard",
    roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
  },
  {
    id: 2,
    label: "پزشکان",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست پزشکان",
          hasLine: true,
          href: "/doctors",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
        {
          id: 2,
          label: "ایجاد پزشک جدید",
          hasLine: false,
          href: "/doctors/new",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 3,
          label: "",
          hasLine: false,
          href: "/doctors/edit/:id",
          roles: ["ADMIN", "DEVELOPER"],
        },
      ],
    },
    roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],

    icon: "Stethoscope",
  },
  {
    id: 3,
    label: "دپارتمان",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست اعضا",
          hasLine: true,
          href: "/department/members",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
        {
          id: 2,
          label: "ایجاد عضو جدید",
          hasLine: false,
          href: "/department/members/new",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 3,
          label: "",
          hasLine: false,
          href: "/department/members/edit/:id",
          roles: ["ADMIN", "DEVELOPER"],
        },
      ],
    },
    roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],

    icon: "Building",
  },
  {
    id: 4,
    label: "گردشگری",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست تیم ها",
          hasLine: false,
          href: "/transfer-team/teams",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 2,
          label: "فهرست افراد",
          hasLine: true,
          href: "/transfer-team/members",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 3,
          label: "ایجاد تیم جدید",
          hasLine: false,
          href: "/transfer-team/teams/new",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 4,
          label: "ایجاد فرد جدید",
          hasLine: false,
          href: "/transfer-team/members/new",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 3,
          label: "",
          show: false,
          hasLine: false,
          href: "/transfer-team/members/edit/:id",
          roles: ["ADMIN", "DEVELOPER"],
        },
      ],
    },
    roles: ["ADMIN", "DEVELOPER"],

    icon: "Luggage",
  },
  {
    id: 5,
    label: "بیماران",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست بیماران",
          hasLine: true,
          href: "/patients",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR", "DOCTOR"],
        },
        {
          id: 2,
          label: "ایجاد بیمار جدید",
          hasLine: false,
          href: "/patients/new",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
        {
          id: 3,
          label: "",
          hasLine: false,
          show: false,
          href: "/patients/edit/:id",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
        // {
        //   id: 4,
        //   label: "بازگردانی بیمار",
        //   hasLine: false,
        //   href: "/patients/restore",
        //   roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        // },
      ],
    },
    roles: ["ADMIN", "DEVELOPER", "COORDINATOR", "DOCTOR"],

    icon: "Users",
  },
  {
    id: 6,
    label: "پذیرش آنلاین",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست پذیرش ها",
          hasLine: true,
          href: "/online-case",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR", "DOCTOR"],
        },
        {
          id: 2,
          label: "ایجاد پذیرش جدید",
          hasLine: false,
          href: "/online-case/new",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR", "DOCTOR"],
        },
      ],
    },
    roles: ["ADMIN", "DEVELOPER", "COORDINATOR", "DOCTOR"],

    icon: "FileUser",
  },
  {
    id: 7,
    label: "خدمات ما",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست خدمات پزشکی",
          hasLine: false,
          href: "/medical-packages",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
        {
          id: 2,
          label: "فهرست خدمات گردشگری",
          hasLine: true,
          href: "/transfer-packages",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 3,
          label: " خدمت پزشکی جدید",
          hasLine: false,
          href: "/medical-packages/new",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 4,
          label: " خدمت گردشگری جدید",
          hasLine: false,
          href: "/transfer-packages/new",
          roles: ["ADMIN", "DEVELOPER"],
        },
      ],
    },
    roles: ["ADMIN", "DEVELOPER"],

    icon: "Package",
  },
  {
    id: 8,
    label: " تخصص ها",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست تخصص ها",
          hasLine: true,
          href: "/expertise",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
        {
          id: 2,
          label: "ایجاد تخصص جدید",
          hasLine: false,
          href: "/expertise/new",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
      ],
    },
    roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],

    icon: "Brain",
  },
  {
    id: 9,
    label: "تعاریف پایه",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "ویرایش تعاریف",
          hasLine: false,
          href: "/default",
          roles: ["ADMIN", "DEVELOPER", "COORDINATOR"],
        },
        {
          id: 2,
          label: "ویرایش کانفیگ",
          hasLine: false,
          href: "/configs",
          roles: ["ADMIN", "DEVELOPER"],
        },
        {
          id: 3,
          label: "ویرایش Terms of Service",
          hasLine: false,
          href: "/tos",
          roles: ["DEVELOPER"],
        },
        {
          id: 4,
          label: "ویرایش Privacy Policy",
          hasLine: false,
          href: "/privacy-policy",
          roles: ["DEVELOPER"],
        },
        {
          id: 5,
          label: "ویرایش زبان ها",
          hasLine: false,
          href: "/languages",
          roles: ["DEVELOPER"],
        },
      ],
    },
    roles: ["DEVELOPER", "ADMIN", "COORDINATOR"],

    icon: "EthernetPort",
  },
  {
    id: 10,
    label: "صفحات",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "فهرست صفحات",
          hasLine: true,
          href: "/pages",
          roles: ["DEVELOPER"],
        },
        {
          id: 2,
          label: "ایجاد صفحه جدید",
          hasLine: false,
          href: "/pages/new",
          roles: ["DEVELOPER"],
        },
      ],
    },
    icon: "Layers",
    roles: ["DEVELOPER"],
  },
  {
    id: 11,
    label: "لاگ ها",
    href: "#",
    sub: {
      items: [
        {
          id: 1,
          label: "لاگ دسترسی ها",
          hasLine: false,
          href: "/logs/access",
          roles: ["DEVELOPER"],
        },
        {
          id: 2,
          label: "لاگ بازرسی",
          hasLine: false,
          href: "/logs/audit",
          roles: ["DEVELOPER"],
        },
        {
          id: 3,
          label: "لاگ خط مشی",
          hasLine: false,
          href: "/logs/policy",
          roles: ["DEVELOPER"],
        },

        {
          id: 5,
          label: "لاگ درخواست ها",
          hasLine: false,
          href: "/logs/requests",
          roles: ["DEVELOPER"],
        },
        {
          id: 6,
          label: "لاگ خطا ها",
          hasLine: false,
          href: "/logs/errors",
          roles: ["DEVELOPER"],
        },
        {
          id: 7,
          label: "لاگ پرفورمنس",
          hasLine: false,
          href: "/logs/performance",
          roles: ["DEVELOPER"],
        },
        {
          id: 8,
          label: "لاگ سرویس آپلود",
          hasLine: false,
          href: "/logs/upload-server",
          roles: ["DEVELOPER"],
        },
      ],
    },
    icon: "Logs",
    roles: ["DEVELOPER"],
  },
];

export const StaffRoles = {
  developer: "DEVELOPER",
  admin: "ADMIN",
  doctor: "DOCTOR",
  coordinator: "COORDINATOR",
} as const;

export type StaffRoles = (typeof StaffRoles)[keyof typeof StaffRoles];

export const UsersType = {
  DOCTOR: "DOCTOR",
  TRANSFER_TEAM: "TRANSFER_TEAM",
  DEPARTMENT: "DEPARTMENT",
} as const;

export type UsersType = (typeof UsersType)[keyof typeof UsersType];
