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: '/suppliers/suppliers-list',
    label: 'Suppliers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTruckFast' in icon ? icon['mdiTruckFast' 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: 'mdiAccountGroup' in icon ? icon['mdiAccountGroup' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CUSTOMERS'
  },
  {
    href: '/uoms/uoms-list',
    label: 'Uoms',
    // 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_UOMS'
  },
  {
    href: '/items/items-list',
    label: 'Items',
    // 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_ITEMS'
  },
  {
    href: '/item_supplier_links/item_supplier_links-list',
    label: 'Item supplier links',
    // 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: 'READ_ITEM_SUPPLIER_LINKS'
  },
  {
    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: '/inventory_lots/inventory_lots-list',
    label: 'Inventory 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_INVENTORY_LOTS'
  },
  {
    href: '/inventory_balances/inventory_balances-list',
    label: 'Inventory balances',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiDatabase' in icon ? icon['mdiDatabase' 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: '/bom_headers/bom_headers-list',
    label: 'Bom headers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileTree' in icon ? icon['mdiFileTree' 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: '/work_centers/work_centers-list',
    label: 'Work centers',
    // 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_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: '/routing_headers/routing_headers-list',
    label: 'Routing headers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiRoute' in icon ? icon['mdiRoute' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ROUTING_HEADERS'
  },
  {
    href: '/routing_operations/routing_operations-list',
    label: 'Routing operations',
    // 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_ROUTING_OPERATIONS'
  },
  {
    href: '/production_orders/production_orders-list',
    label: 'Production orders',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardPlay' in icon ? icon['mdiClipboardPlay' 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_issues/material_issues-list',
    label: 'Material issues',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPackageDown' in icon ? icon['mdiPackageDown' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MATERIAL_ISSUES'
  },
  {
    href: '/production_receipts/production_receipts-list',
    label: 'Production receipts',
    // 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_PRODUCTION_RECEIPTS'
  },
  {
    href: '/qa_inspection_plans/qa_inspection_plans-list',
    label: 'Qa inspection plans',
    // 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_QA_INSPECTION_PLANS'
  },
  {
    href: '/qa_inspections/qa_inspections-list',
    label: 'Qa inspections',
    // 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_QA_INSPECTIONS'
  },
  {
    href: '/nonconformances/nonconformances-list',
    label: 'Nonconformances',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAlertOctagonOutline' in icon ? icon['mdiAlertOctagonOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_NONCONFORMANCES'
  },
  {
    href: '/capa_actions/capa_actions-list',
    label: 'Capa actions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardAlertOutline' in icon ? icon['mdiClipboardAlertOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CAPA_ACTIONS'
  },
  {
    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: '/purchase_orders/purchase_orders-list',
    label: 'Purchase orders',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCartOutline' in icon ? icon['mdiCartOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PURCHASE_ORDERS'
  },
  {
    href: '/purchase_order_lines/purchase_order_lines-list',
    label: 'Purchase order lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPlaylistPlus' in icon ? icon['mdiPlaylistPlus' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PURCHASE_ORDER_LINES'
  },
  {
    href: '/sales_orders/sales_orders-list',
    label: 'Sales orders',
    // 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_SALES_ORDERS'
  },
  {
    href: '/sales_order_lines/sales_order_lines-list',
    label: 'Sales order lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPlaylistEdit' in icon ? icon['mdiPlaylistEdit' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SALES_ORDER_LINES'
  },
  {
    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: 'mdiPackageVariantClosed' in icon ? icon['mdiPackageVariantClosed' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SHIPMENT_LINES'
  },
  {
    href: '/cost_centers/cost_centers-list',
    label: 'Cost centers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBankOutline' in icon ? icon['mdiBankOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COST_CENTERS'
  },
  {
    href: '/cost_elements/cost_elements-list',
    label: 'Cost elements',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChartDonutVariant' in icon ? icon['mdiChartDonutVariant' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COST_ELEMENTS'
  },
  {
    href: '/standard_costs/standard_costs-list',
    label: 'Standard costs',
    // 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_STANDARD_COSTS'
  },
  {
    href: '/production_costs/production_costs-list',
    label: 'Production costs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCalculatorVariantOutline' in icon ? icon['mdiCalculatorVariantOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRODUCTION_COSTS'
  },
  {
    href: '/price_lists/price_lists-list',
    label: 'Price lists',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTagOutline' in icon ? icon['mdiTagOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRICE_LISTS'
  },
  {
    href: '/price_list_lines/price_list_lines-list',
    label: 'Price list lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTagMultipleOutline' in icon ? icon['mdiTagMultipleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRICE_LIST_LINES'
  },
  {
    href: '/documents/documents-list',
    label: 'Documents',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDocumentCheckOutline' in icon ? icon['mdiFileDocumentCheckOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DOCUMENTS'
  },
  {
    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
