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

const menuAside: MenuAsideItem[] = [
  {
    href: '/dashboard',
    icon: icon.mdiViewDashboardOutline,
    label: 'Dashboard',
    permissions: 'UPDATE_USERS',
  },
  
  {
    href: '/log-work',
    label: 'Log Work',
    icon: icon.mdiPencil,
    permissions: 'CREATE_JOB_LOGS'
  },
  {
    href: '/my-logs',
    label: 'My Logs',
    icon: icon.mdiViewList,
    permissions: 'READ_JOB_LOGS'
  },
  
  {
    href: '/users/users-list',
    label: 'Users',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiAccountGroup ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/roles/roles-list',
    label: 'Roles',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiShieldAccountVariantOutline ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/permissions/permissions-list',
    label: 'Permissions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiShieldAccountOutline ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/customers/customers-list',
    label: 'Customers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountMultiple' in icon ? icon['mdiAccountMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/vehicles/vehicles-list',
    label: 'Vehicles',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTruck' in icon ? icon['mdiTruck' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/workers_comp_classes/workers_comp_classes-list',
    label: 'Workmans Comp',
    icon: icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/pay_types/pay_types-list',
    label: 'Pay types',
    // 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: 'UPDATE_USERS'
  },
  {
    href: '/employee_pay_types/employee_pay_types-list',
    label: 'Employee pay types',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiLinkVariant' in icon ? icon['mdiLinkVariant' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/job_logs/job_logs-list',
    label: 'All Job Logs',
    icon: 'mdiClipboardTextClock' in icon ? icon['mdiClipboardTextClock' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/payroll_runs/payroll_runs-list',
    label: 'Payroll runs',
    // 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: 'UPDATE_USERS'
  },
  {
    href: '/payroll_line_items/payroll_line_items-list',
    label: 'Payroll line items',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDocumentOutline' in icon ? icon['mdiFileDocumentOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/reports',
    label: 'Payroll Dashboard',
    icon: icon.mdiChartBar,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/admin-help',
    label: 'Admin Help',
    icon: icon.mdiHelpCircleOutline,
    permissions: 'UPDATE_USERS'
  },
  {
    href: '/profile',
    label: 'Profile',
    icon: icon.mdiAccountCircle,
  },

 
  {
    href: '/api-docs',
    target: '_blank',
    label: 'Swagger API',
    icon: icon.mdiFileCode,
    permissions: 'UPDATE_USERS'
  },
]

export default menuAside