import { Permission } from '../../shared-state'
import {
  ActivitiesIcon,
  AdmissionsIcon,
  ClassroomsIcon,
  DashboardIcon,
  HostelsIcon,
  LogsIcon,
  HrmsIcon,
  ReportsIcon,
  SettingsIcon,
  StudentsIcon,
  TaskListIcon,
} from './icons'
;``
export interface IMenuItem {
  title: string
  path: string
  icon?: any
  children?: Array<IMenuItem>
  permissionKey?: string
}

export const dashboardMenu: Array<IMenuItem> = [
  {
    title: 'Dashboard',
    path: '/dashboard',
    icon: DashboardIcon,
    permissionKey: Permission.CAN_DASHBOARD_VIEW,
  },
  {
    title: 'Tasks',
    path: '/tasks',
    icon: TaskListIcon,
    children: [
      {
        title: 'Dashboard',
        path: '/dashboard',
      },
      {
        title: 'Taskboard',
        path: '/taskboard/pending-task/',
        permissionKey: Permission.CAN_TASKS_VIEW,
      },
      {
        title: 'Reports',
        path: '/reports',
      },
    ],
  },
  {
    title: 'Admissions',
    path: '/admissions',
    icon: AdmissionsIcon,
    children: [
      {
        title: 'Dashboard',
        path: '/dashboard',
        permissionKey: Permission.CAN_ADMISSIONS_DASHBOARD_VIEW,
      },
      {
        title: 'Leads',
        path: '/leads',
        permissionKey: Permission.ADMISSIONS_VIEW,
      },
      {
        title: 'CET',
        path: '/cet',
        permissionKey: Permission.ADMISSIONS_VIEW,
      },

      {
        title: 'Reports',
        path: '/reports',
        permissionKey: Permission.ADMISSIONS_VIEW,
      },
      {
        title: 'All Admissions',
        path: '/all',
        permissionKey: Permission.ADMISSIONS_VIEW,
      },
    ],
  },

  {
    title: 'Students',
    path: '/students',
    icon: StudentsIcon,
    permissionKey: Permission.STUDENTS_VIEW,

    // children: [
    //   {
    //     title: 'All Students',
    //     path: '/students',
    //     icon: UserOutlined,
    //     permissionKey: Permission.STUDENTS_VIEW,
    //   },
    //   {
    //     title: 'Detained Students',
    //     path: '/detained-students',
    //     icon: UserOutlined,
    //     permissionKey: Permission.STUDENTS_DETAIN,
    //   },
    // ],
  },
  {
    title: 'Classrooms',
    path: '/classrooms',
    icon: ClassroomsIcon,
    children: [
      {
        title: 'Classrooms',
        path: '/classrooms',
        permissionKey: Permission.CLASSROOM_VIEW,
      },
      {
        title: 'Faculty Timetable',
        path: '/faculty-timetable',
        permissionKey: Permission.CLASSROOM_VIEW,
      },
      {
        title: 'Reports',
        path: '/reports/classrooms',
        permissionKey: Permission.CLASSROOM_VIEW,
      },
    ],
  },
  {
    title: 'Activities',
    path: '/activities',
    icon: ActivitiesIcon,
    children: [
      {
        title: 'Clubs',
        path: '/clubs',
        permissionKey: Permission.EXTRA_CURRICULAR_ACTIVITIES_CLUBS,
      },
      {
        title: 'Events',
        path: '/events',
        permissionKey: Permission.EXTRA_CURRICULAR_ACTIVITIES_EVENTS,
      },
    ],
  },

  {
    title: 'Hostels',
    path: '/hostels',
    icon: HostelsIcon,
    children: [
      {
        title: 'Dashboard',
        path: '/dashboard',
        permissionKey: Permission.CAN_HOSTELER_DASHBOARD_VIEW,
      },
      {
        title: 'Hostelers',
        path: '/hostelers',
        permissionKey: Permission.CAN_HOSTELER_VIEW,
      },
      {
        title: 'Fee Payments',
        path: '/fee-payments',
        permissionKey: Permission.CAN_HOSTELER_FEE_PAYMENT_VIEW,
      },
      {
        title: 'Reports',
        path: '/reports',
        permissionKey: Permission.CAN_HOSTELER_REPORTS_VIEW,
      },
    ],
  },
  {
    title: 'Library',
    path: '/library',
    icon: HostelsIcon,
    children: [
      {
        title: 'Dashboard',
        path: '/dashboard',
        // permissionKey: Permission.CAN_HOSTELER_DASHBOARD_VIEW,
      },
      {
        title: 'Catalogue',
        path: '/catalogue',
      },
      {
        title: 'Cards',
        path: '/cards',
      },
      {
        title: 'Reports',
        path: '/reports',
      },
      // {
      //   title: 'Feedback System',
      //   path: '/hostels/feedback-system',
      // },
    ],
  },
  {
    title: 'HRMS',
    path: '/hrms',
    icon: HrmsIcon,
    children: [
      {
        title: 'Leave Applications',
        path: '/leave-applications',
      },
    ],
  },

  {
    title: 'Course Registrations',
    path: '/course-registrations',
    icon: ReportsIcon,
    permissionKey: Permission.COURSE_REGISTRATION_VIEW,
  },

  {
    title: 'Activity Logs',
    path: '/audit-logs',
    icon: LogsIcon,
    permissionKey: Permission.VIEW_AUDIT_LOGS,
  },
  {
    title: 'Settings',
    path: '/settings',
    icon: SettingsIcon,
    permissionKey: Permission.CAN_SETTINGS_VIEW,
  },
]
