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: '/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: 'mdiVectorSquare' in icon ? icon['mdiVectorSquare' 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: '/maintenance_work_orders/maintenance_work_orders-list',
    label: 'Maintenance work orders',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWrench' in icon ? icon['mdiWrench' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MAINTENANCE_WORK_ORDERS'
  },
  {
    href: '/downtime_events/downtime_events-list',
    label: 'Downtime events',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAlertOctagon' in icon ? icon['mdiAlertOctagon' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DOWNTIME_EVENTS'
  },
  {
    href: '/uoms/uoms-list',
    label: 'Uoms',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiRuler' in icon ? icon['mdiRuler' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_UOMS'
  },
  {
    href: '/item_categories/item_categories-list',
    label: 'Item categories',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiShape' in icon ? icon['mdiShape' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ITEM_CATEGORIES'
  },
  {
    href: '/items/items-list',
    label: 'Items',
    // 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_ITEMS'
  },
  {
    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: 'mdiMapMarker' in icon ? icon['mdiMapMarker' 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: 'mdiLayersTriple' in icon ? icon['mdiLayersTriple' 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: '/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: '/purchase_orders/purchase_orders-list',
    label: 'Purchase orders',
    // 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_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: 'mdiFormatListBulleted' in icon ? icon['mdiFormatListBulleted' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PURCHASE_ORDER_LINES'
  },
  {
    href: '/receipts/receipts-list',
    label: 'Receipts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiInboxArrowDown' in icon ? icon['mdiInboxArrowDown' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RECEIPTS'
  },
  {
    href: '/receipt_lines/receipt_lines-list',
    label: 'Receipt lines',
    // 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_RECEIPT_LINES'
  },
  {
    href: '/boms/boms-list',
    label: 'Boms',
    // 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_BOMS'
  },
  {
    href: '/bom_lines/bom_lines-list',
    label: 'Bom 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_BOM_LINES'
  },
  {
    href: '/routings/routings-list',
    label: 'Routings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSitemap' in icon ? icon['mdiSitemap' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ROUTINGS'
  },
  {
    href: '/routing_operations/routing_operations-list',
    label: 'Routing 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_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: 'mdiPlaylistPlay' in icon ? icon['mdiPlaylistPlay' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRODUCTION_OPERATIONS'
  },
  {
    href: '/production_materials/production_materials-list',
    label: 'Production materials',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBeakerOutline' in icon ? icon['mdiBeakerOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRODUCTION_MATERIALS'
  },
  {
    href: '/production_outputs/production_outputs-list',
    label: 'Production outputs',
    // 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_OUTPUTS'
  },
  {
    href: '/qa_plans/qa_plans-list',
    label: 'Qa 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_PLANS'
  },
  {
    href: '/qa_characteristics/qa_characteristics-list',
    label: 'Qa characteristics',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChartBellCurve' in icon ? icon['mdiChartBellCurve' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_QA_CHARACTERISTICS'
  },
  {
    href: '/qa_inspections/qa_inspections-list',
    label: 'Qa inspections',
    // 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_QA_INSPECTIONS'
  },
  {
    href: '/qa_results/qa_results-list',
    label: 'Qa results',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardTextSearch' in icon ? icon['mdiClipboardTextSearch' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_QA_RESULTS'
  },
  {
    href: '/nonconformances/nonconformances-list',
    label: 'Nonconformances',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAlertCircleCheck' in icon ? icon['mdiAlertCircleCheck' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_NONCONFORMANCES'
  },
  {
    href: '/documents/documents-list',
    label: 'Documents',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDocumentMultiple' in icon ? icon['mdiFileDocumentMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DOCUMENTS'
  },
  {
    href: '/audit_logs/audit_logs-list',
    label: 'Audit logs',
    // 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_AUDIT_LOGS'
  },
  {
    href: '/gl_accounts/gl_accounts-list',
    label: 'Gl accounts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBank' in icon ? icon['mdiBank' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_GL_ACCOUNTS'
  },
  {
    href: '/journal_entries/journal_entries-list',
    label: 'Journal entries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBookOpenVariant' in icon ? icon['mdiBookOpenVariant' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_JOURNAL_ENTRIES'
  },
  {
    href: '/journal_lines/journal_lines-list',
    label: 'Journal lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFormatListNumbered' in icon ? icon['mdiFormatListNumbered' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_JOURNAL_LINES'
  },
  {
    href: '/cost_centers/cost_centers-list',
    label: 'Cost centers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChartDonut' in icon ? icon['mdiChartDonut' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COST_CENTERS'
  },
  {
    href: '/item_costs/item_costs-list',
    label: 'Item 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_ITEM_COSTS'
  },
  {
    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
