import * as icon from '@mdi/js';
import { MenuAsideItem } from './interfaces';

const menuAside: MenuAsideItem[] = [
  {
    href: '/dashboard',
    icon: icon.mdiViewDashboardOutline,
    label: 'Dashboard',
  },

  {
    href: '/users/users-list',
    label: 'Users',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiAccountGroup ?? icon.mdiTable,
    permissions: 'READ_USERS',
  },
  {
    href: '/app_accounts/app_accounts-list',
    label: 'App accounts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiApplication' in icon
        ? icon['mdiApplication' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APP_ACCOUNTS',
  },
  {
    href: '/applications/applications-list',
    label: 'Applications',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiFileDocumentEdit' in icon
        ? icon['mdiFileDocumentEdit' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APPLICATIONS',
  },
  {
    href: '/approvals/approvals-list',
    label: 'Approvals',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCheckCircleOutline' in icon
        ? icon['mdiCheckCircleOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APPROVALS',
  },
  {
    href: '/audit_logs/audit_logs-list',
    label: 'Audit logs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiClipboardListOutline' in icon
        ? icon['mdiClipboardListOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_AUDIT_LOGS',
  },
  {
    href: '/benefit_plans/benefit_plans-list',
    label: 'Benefit plans',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiMedicalBag' in icon
        ? icon['mdiMedicalBag' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BENEFIT_PLANS',
  },
  {
    href: '/bills/bills-list',
    label: 'Bills',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiFileInvoice' in icon
        ? icon['mdiFileInvoice' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BILLS',
  },
  {
    href: '/candidates/candidates-list',
    label: 'Candidates',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccountSearch' in icon
        ? icon['mdiAccountSearch' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CANDIDATES',
  },
  {
    href: '/cards/cards-list',
    label: 'Cards',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCreditCardOutline' in icon
        ? icon['mdiCreditCardOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CARDS',
  },
  {
    href: '/compensations/compensations-list',
    label: 'Compensations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCurrencyUsd' in icon
        ? icon['mdiCurrencyUsd' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COMPENSATIONS',
  },
  {
    href: '/deductions/deductions-list',
    label: 'Deductions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiMinusCircle' in icon
        ? icon['mdiMinusCircle' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DEDUCTIONS',
  },
  {
    href: '/devices/devices-list',
    label: 'Devices',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiDevices' in icon
        ? icon['mdiDevices' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DEVICES',
  },
  {
    href: '/documents/documents-list',
    label: 'Documents',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiFileDocument' in icon
        ? icon['mdiFileDocument' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DOCUMENTS',
  },
  {
    href: '/earnings/earnings-list',
    label: 'Earnings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCurrencyUsdCircle' in icon
        ? icon['mdiCurrencyUsdCircle' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EARNINGS',
  },
  {
    href: '/employees/employees-list',
    label: 'Employees',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccount' in icon
        ? icon['mdiAccount' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EMPLOYEES',
  },
  {
    href: '/employments/employments-list',
    label: 'Employments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiBriefcase' in icon
        ? icon['mdiBriefcase' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EMPLOYMENTS',
  },
  {
    href: '/enrollment_learnings/enrollment_learnings-list',
    label: 'Enrollment learnings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiSchoolOutline' in icon
        ? icon['mdiSchoolOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ENROLLMENT_LEARNINGS',
  },
  {
    href: '/enrollments/enrollments-list',
    label: 'Enrollments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccountGroup' in icon
        ? icon['mdiAccountGroup' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ENROLLMENTS',
  },
  {
    href: '/expense_lines/expense_lines-list',
    label: 'Expense lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiReceipt' in icon
        ? icon['mdiReceipt' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EXPENSE_LINES',
  },
  {
    href: '/expense_reports/expense_reports-list',
    label: 'Expense reports',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiFileDocument' in icon
        ? icon['mdiFileDocument' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EXPENSE_REPORTS',
  },
  {
    href: '/goals/goals-list',
    label: 'Goals',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiTarget' in icon
        ? icon['mdiTarget' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_GOALS',
  },
  {
    href: '/identity_accounts/identity_accounts-list',
    label: 'Identity accounts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccountKey' in icon
        ? icon['mdiAccountKey' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_IDENTITY_ACCOUNTS',
  },
  {
    href: '/interviews/interviews-list',
    label: 'Interviews',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendarAccount' in icon
        ? icon['mdiCalendarAccount' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INTERVIEWS',
  },
  {
    href: '/inventory_events/inventory_events-list',
    label: 'Inventory events',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiHistory' in icon
        ? icon['mdiHistory' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INVENTORY_EVENTS',
  },
  {
    href: '/job_requisitions/job_requisitions-list',
    label: 'Job requisitions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiBriefcaseOutline' in icon
        ? icon['mdiBriefcaseOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_JOB_REQUISITIONS',
  },
  {
    href: '/learning_courses/learning_courses-list',
    label: 'Learning courses',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiBookOpenPageVariant' in icon
        ? icon['mdiBookOpenPageVariant' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LEARNING_COURSES',
  },
  {
    href: '/leave_requests/leave_requests-list',
    label: 'Leave requests',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendarCheck' in icon
        ? icon['mdiCalendarCheck' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LEAVE_REQUESTS',
  },
  {
    href: '/offers/offers-list',
    label: 'Offers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiFileSend' in icon
        ? icon['mdiFileSend' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_OFFERS',
  },
  {
    href: '/payments/payments-list',
    label: 'Payments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCashMultiple' in icon
        ? icon['mdiCashMultiple' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PAYMENTS',
  },
  {
    href: '/payroll_runs/payroll_runs-list',
    label: 'Payroll runs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendar' in icon
        ? icon['mdiCalendar' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PAYROLL_RUNS',
  },
  {
    href: '/policies/policies-list',
    label: 'Policies',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiShieldCheck' in icon
        ? icon['mdiShieldCheck' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_POLICIES',
  },
  {
    href: '/positions/positions-list',
    label: 'Positions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiOfficeBuilding' in icon
        ? icon['mdiOfficeBuilding' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_POSITIONS',
  },
  {
    href: '/review_cycles/review_cycles-list',
    label: 'Review cycles',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendarRange' in icon
        ? icon['mdiCalendarRange' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_REVIEW_CYCLES',
  },
  {
    href: '/reviews/reviews-list',
    label: 'Reviews',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiStarCircle' in icon
        ? icon['mdiStarCircle' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_REVIEWS',
  },
  {
    href: '/schedule_shifts/schedule_shifts-list',
    label: 'Schedule shifts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendarClock' in icon
        ? icon['mdiCalendarClock' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SCHEDULE_SHIFTS',
  },
  {
    href: '/taxes/taxes-list',
    label: 'Taxes',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiGavel' in icon
        ? icon['mdiGavel' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TAXES',
  },
  {
    href: '/time_entries/time_entries-list',
    label: 'Time entries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiClockTimeFourOutline' in icon
        ? icon['mdiClockTimeFourOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TIME_ENTRIES',
  },
  {
    href: '/timecards/timecards-list',
    label: 'Timecards',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiClockOutline' in icon
        ? icon['mdiClockOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TIMECARDS',
  },
  {
    href: '/travel_bookings/travel_bookings-list',
    label: 'Travel bookings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAirplane' in icon
        ? icon['mdiAirplane' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TRAVEL_BOOKINGS',
  },
  {
    href: '/vendors/vendors-list',
    label: 'Vendors',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiStore' in icon
        ? icon['mdiStore' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_VENDORS',
  },
  {
    href: '/roles/roles-list',
    label: 'Roles',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiShieldAccountVariantOutline ?? icon.mdiTable,
    permissions: 'READ_ROLES',
  },
  {
    href: '/permissions/permissions-list',
    label: 'Permissions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiShieldAccountOutline ?? icon.mdiTable,
    permissions: 'READ_PERMISSIONS',
  },
  {
    href: '/organizations/organizations-list',
    label: 'Organizations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ORGANIZATIONS',
  },
  {
    href: '/profile',
    label: 'Profile',
    icon: icon.mdiAccountCircle,
  },

  {
    href: '/about',
    label: 'Home page',
    icon: icon.mdiHome,
    withDevider: true,
  },
  {
    href: '/api-docs',
    target: '_blank',
    label: 'Swagger API',
    icon: icon.mdiFileCode,
    permissions: 'READ_API_DOCS',
  },
];

export default menuAside;
