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: '/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: '/plants/plants-list',
    label: 'Plants',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFactory' in icon ? icon['mdiFactory' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PLANTS'
  },
  {
    href: '/work_centers/work_centers-list',
    label: 'Work centers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFactoryCog' in icon ? icon['mdiFactoryCog' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WORK_CENTERS'
  },
  {
    href: '/machines/machines-list',
    label: 'Machines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiRobotIndustrial' in icon ? icon['mdiRobotIndustrial' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MACHINES'
  },
  {
    href: '/materials/materials-list',
    label: 'Materials',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCubeOutline' in icon ? icon['mdiCubeOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MATERIALS'
  },
  {
    href: '/bom_headers/bom_headers-list',
    label: 'Bom headers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileTreeOutline' in icon ? icon['mdiFileTreeOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BOM_HEADERS'
  },
  {
    href: '/bom_lines/bom_lines-list',
    label: 'Bom lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFormatListBulleted' in icon ? icon['mdiFormatListBulleted' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BOM_LINES'
  },
  {
    href: '/routings/routings-list',
    label: 'Routings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTransitConnection' in icon ? icon['mdiTransitConnection' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ROUTINGS'
  },
  {
    href: '/routing_steps/routing_steps-list',
    label: 'Routing steps',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSteps' in icon ? icon['mdiSteps' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ROUTING_STEPS'
  },
  {
    href: '/suppliers/suppliers-list',
    label: 'Suppliers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTruckFastOutline' in icon ? icon['mdiTruckFastOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SUPPLIERS'
  },
  {
    href: '/customers/customers-list',
    label: 'Customers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountGroupOutline' in icon ? icon['mdiAccountGroupOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CUSTOMERS'
  },
  {
    href: '/warehouses/warehouses-list',
    label: 'Warehouses',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWarehouse' in icon ? icon['mdiWarehouse' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WAREHOUSES'
  },
  {
    href: '/locations/locations-list',
    label: 'Locations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMapMarkerOutline' in icon ? icon['mdiMapMarkerOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LOCATIONS'
  },
  {
    href: '/lots/lots-list',
    label: 'Lots',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBarcode' in icon ? icon['mdiBarcode' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LOTS'
  },
  {
    href: '/serials/serials-list',
    label: 'Serials',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiNumeric' in icon ? icon['mdiNumeric' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SERIALS'
  },
  {
    href: '/inventory_balances/inventory_balances-list',
    label: 'Inventory balances',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiDatabaseOutline' in icon ? icon['mdiDatabaseOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INVENTORY_BALANCES'
  },
  {
    href: '/inventory_transactions/inventory_transactions-list',
    label: 'Inventory transactions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSwapHorizontal' in icon ? icon['mdiSwapHorizontal' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INVENTORY_TRANSACTIONS'
  },
  {
    href: '/cycle_counts/cycle_counts-list',
    label: 'Cycle counts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardCheckOutline' in icon ? icon['mdiClipboardCheckOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CYCLE_COUNTS'
  },
  {
    href: '/cycle_count_lines/cycle_count_lines-list',
    label: 'Cycle count lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFormatListChecks' in icon ? icon['mdiFormatListChecks' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CYCLE_COUNT_LINES'
  },
  {
    href: '/production_orders/production_orders-list',
    label: 'Production orders',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardTextOutline' in icon ? icon['mdiClipboardTextOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRODUCTION_ORDERS'
  },
  {
    href: '/production_operations/production_operations-list',
    label: 'Production operations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiProgressWrench' in icon ? icon['mdiProgressWrench' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRODUCTION_OPERATIONS'
  },
  {
    href: '/material_allocations/material_allocations-list',
    label: 'Material allocations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPackageVariantClosed' in icon ? icon['mdiPackageVariantClosed' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MATERIAL_ALLOCATIONS'
  },
  {
    href: '/production_lots/production_lots-list',
    label: 'Production lots',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCubeSend' in icon ? icon['mdiCubeSend' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRODUCTION_LOTS'
  },
  {
    href: '/inspection_plans/inspection_plans-list',
    label: 'Inspection plans',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardTextSearchOutline' in icon ? icon['mdiClipboardTextSearchOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INSPECTION_PLANS'
  },
  {
    href: '/inspection_characteristics/inspection_characteristics-list',
    label: 'Inspection characteristics',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiRulerSquare' in icon ? icon['mdiRulerSquare' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INSPECTION_CHARACTERISTICS'
  },
  {
    href: '/inspections/inspections-list',
    label: 'Inspections',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardCheck' in icon ? icon['mdiClipboardCheck' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INSPECTIONS'
  },
  {
    href: '/inspection_results/inspection_results-list',
    label: 'Inspection results',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCheckDecagramOutline' in icon ? icon['mdiCheckDecagramOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INSPECTION_RESULTS'
  },
  {
    href: '/nonconformances/nonconformances-list',
    label: 'Nonconformances',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAlertCircleOutline' in icon ? icon['mdiAlertCircleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_NONCONFORMANCES'
  },
  {
    href: '/dispositions/dispositions-list',
    label: 'Dispositions',
    // 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_DISPOSITIONS'
  },
  {
    href: '/corrective_actions/corrective_actions-list',
    label: 'Corrective actions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiShieldCheckOutline' in icon ? icon['mdiShieldCheckOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CORRECTIVE_ACTIONS'
  },
  {
    href: '/downtime_events/downtime_events-list',
    label: 'Downtime events',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTimelineAlertOutline' in icon ? icon['mdiTimelineAlertOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DOWNTIME_EVENTS'
  },
  {
    href: '/machine_readings/machine_readings-list',
    label: 'Machine readings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiGauge' in icon ? icon['mdiGauge' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MACHINE_READINGS'
  },
  {
    href: '/maintenance_work_orders/maintenance_work_orders-list',
    label: 'Maintenance work orders',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWrenchOutline' in icon ? icon['mdiWrenchOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MAINTENANCE_WORK_ORDERS'
  },
  {
    href: '/documents/documents-list',
    label: 'Documents',
    // 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: 'READ_DOCUMENTS'
  },
  {
    href: '/shipments/shipments-list',
    label: 'Shipments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTruckDeliveryOutline' in icon ? icon['mdiTruckDeliveryOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SHIPMENTS'
  },
  {
    href: '/shipment_lines/shipment_lines-list',
    label: 'Shipment lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPackageUp' in icon ? icon['mdiPackageUp' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SHIPMENT_LINES'
  },
  {
    href: '/profile',
    label: 'Profile',
    icon: icon.mdiAccountCircle,
  },

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

export default menuAside
