import { readonly } from "vue";
interface ScrollType {
  position: number;
  direction: string;
  directionChanged: boolean;
  inflectionPoint: number;
  delta: number;
}

interface tabType {
  key: number;
  label: string;
  tag: string;
}
interface childrenType {
  key: number;
  label: string;
  path?: string;
}

interface menuType {
  key: number;
  icon: string;
  activeIcon: string;
  label: string;
  path: string;
  children?: childrenType[];
}

interface notiType {
  id: string;
  sender: string;
  body: string;
  timereceive: string;
  isOpen: boolean;
}

interface optionType {
  icon: string;
  label: string;
  value: string;
  color: string;
}

const menuList = readonly<any[]>([
  {
    key: 1,
    icon: "mdi-home-variant-outline",
    activeIcon: "mdi-home-variant",
    label: "หน้าแรก",
    path: "dashboard",
    role: ["SUPER_ADMIN", "ADMIN"],
  },
  {
    key: 2,
    icon: "o_person",
    activeIcon: "person",
    label: "ข้อมูลหลัก",
    path: "metadata",
    role: ["SUPER_ADMIN"],
    children: [
      {
        key: 2.0,
        label: "ข้อมูลเกี่ยวกับบุคคล",
        path: "masterPersonal",
        role: ["SUPER_ADMIN"],
      },
      {
        key: 2.0,
        label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
        path: "masterPosition",
        role: ["SUPER_ADMIN"],
      },
      {
        key: 2.0,
        label: "ข้อมูลตำแหน่งลูกจ้างประจำ",
        path: "masterPositionEmployee",
        role: ["SUPER_ADMIN"],
      },
      {
        key: 2.0,
        label: "ข้อมูลปฏิทินวันหยุด",
        path: "masterCalendarWork",
        role: ["SUPER_ADMIN"],
      },
      {
        key: 2.0,
        label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
        path: "masterInsigniaPage",
        role: ["SUPER_ADMIN"],
      },
    ],
  },
  {
    key: 2,
    icon: "mdi-account-badge",
    activeIcon: "groups",
    label: "จัดการผู้ใช้งานและสิทธิ์",
    role: ["SUPER_ADMIN", "ADMIN"],
    children: [
      {
        key: 2.0,
        label: "จัดการผู้ใช้งาน",
        path: "manageUsers",
        role: ["SUPER_ADMIN", "ADMIN"],
      },
      {
        key: 2.0,
        label: "จัดการบทบาทและสิทธิ์ (Roles)",
        path: "manageRoles",
        role: ["SUPER_ADMIN"],
      },
      {
        key: 2.0,
        label: "กำหนดสิทธิ์ (Permissions)",
        path: "managePermission",
        role: ["SUPER_ADMIN", "ADMIN"],
      },
      {
        key: 2.0,
        label: "กำหนดหน้าที่จัดการโครงสร้าง (แบบร่าง)",
        path: "roleOrganization",
        role: ["SUPER_ADMIN", "ADMIN"],
      },
      {
        key: 2.0,
        label: "มอบหมายหน้าที่ความรับผิดชอบตามโครงสร้างปัจจุบัน",
        path: "responsibilities",
        role: ["SUPER_ADMIN", "ADMIN"],
      },
      {
        key: 2.0,
        label: "ทะเบียนประวัติตำแหน่ง/เงินเดือน",
        path: "rolePositionSalary",
        role: ["SUPER_ADMIN", "ADMIN"],
      },
    ],
  },
  {
    key: 4,
    icon: "history",
    activeIcon: "groups",
    label: "ประวัติกิจกรรม (Logs)",
    path: "viewLogs",
    role: ["SUPER_ADMIN", "ADMIN"],
  },
  {
    key: 5,
    icon: "settings",
    activeIcon: "settings",
    label: "ตั้งค่าระบบ",
    path: "viewSystem",
    role: ["SUPER_ADMIN"],
  },
  {
    key: 2,
    icon: "mdi-file-document-outline",
    activeIcon: "mdi-file-document-outline",
    label: "คำสั่งและต้นแบบ",
    role: ["SUPER_ADMIN"],
    children: [
      {
        key: 2.0,
        label: "รายการคำสั่ง",
        path: "commandTemplate",
        role: ["SUPER_ADMIN"],
      },
      {
        key: 2.0,
        label: "ต้นแบบสำหรับลงในตำแหน่ง/เงินเดือน",
        path: "salaryTemplate",
        role: ["SUPER_ADMIN"],
      },
    ],
  },

  {
    key: 6,
    icon: "mdi-web",
    activeIcon: "mdi-web",
    label: "จัดการ web services",
    path: "manageWebservices",
    role: ["SUPER_ADMIN"],
  },
  {
    key: 7,
    icon: "mdi-bug",
    activeIcon: "mdi-bug",
    label: "รายงานปัญหา",
    path: "manageIssues",
    role: ["SUPER_ADMIN", "ISSUE"],
  },
]);

export { menuList };
export type { ScrollType, tabType, menuType, notiType, optionType };
