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: '/tenants/tenants-list',
    label: 'Tenants',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiDomain' in icon ? icon['mdiDomain' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TENANTS'
  },
  {
    href: '/memberships/memberships-list',
    label: 'Memberships',
    // 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: 'READ_MEMBERSHIPS'
  },
  {
    href: '/role_assignments/role_assignments-list',
    label: 'Role assignments',
    // 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_ROLE_ASSIGNMENTS'
  },
  {
    href: '/approval_workflows/approval_workflows-list',
    label: 'Approval workflows',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCheckDecagram' in icon ? icon['mdiCheckDecagram' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APPROVAL_WORKFLOWS'
  },
  {
    href: '/approval_steps/approval_steps-list',
    label: 'Approval steps',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiStairs' in icon ? icon['mdiStairs' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APPROVAL_STEPS'
  },
  {
    href: '/approval_requests/approval_requests-list',
    label: 'Approval requests',
    // 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_APPROVAL_REQUESTS'
  },
  {
    href: '/approval_decisions/approval_decisions-list',
    label: 'Approval decisions',
    // 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_APPROVAL_DECISIONS'
  },
  {
    href: '/companies/companies-list',
    label: 'Companies',
    // 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_COMPANIES'
  },
  {
    href: '/customers/customers-list',
    label: 'Customers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountBox' in icon ? icon['mdiAccountBox' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CUSTOMERS'
  },
  {
    href: '/suppliers/suppliers-list',
    label: 'Suppliers',
    // 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: 'READ_SUPPLIERS'
  },
  {
    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: 'mdiTagMultiple' in icon ? icon['mdiTagMultiple' 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: 'mdiPackageVariant' in icon ? icon['mdiPackageVariant' 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: '/lots/lots-list',
    label: 'Lots',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFlaskOutline' in icon ? icon['mdiFlaskOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LOTS'
  },
  {
    href: '/serial_numbers/serial_numbers-list',
    label: 'Serial numbers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBarcodeScan' in icon ? icon['mdiBarcodeScan' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SERIAL_NUMBERS'
  },
  {
    href: '/inventory_transfers/inventory_transfers-list',
    label: 'Inventory transfers',
    // 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_TRANSFERS'
  },
  {
    href: '/inventory_transfer_lines/inventory_transfer_lines-list',
    label: 'Inventory transfer 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_INVENTORY_TRANSFER_LINES'
  },
  {
    href: '/stock_movements/stock_movements-list',
    label: 'Stock movements',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTimelineTextOutline' in icon ? icon['mdiTimelineTextOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_STOCK_MOVEMENTS'
  },
  {
    href: '/quotations/quotations-list',
    label: 'Quotations',
    // 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_QUOTATIONS'
  },
  {
    href: '/quotation_lines/quotation_lines-list',
    label: 'Quotation 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_QUOTATION_LINES'
  },
  {
    href: '/sales_orders/sales_orders-list',
    label: 'Sales 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_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: 'mdiFormatListBulletedSquare' in icon ? icon['mdiFormatListBulletedSquare' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SALES_ORDER_LINES'
  },
  {
    href: '/sales_allocations/sales_allocations-list',
    label: 'Sales allocations',
    // 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_SALES_ALLOCATIONS'
  },
  {
    href: '/invoices/invoices-list',
    label: 'Invoices',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiReceiptTextOutline' in icon ? icon['mdiReceiptTextOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INVOICES'
  },
  {
    href: '/invoice_lines/invoice_lines-list',
    label: 'Invoice 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_INVOICE_LINES'
  },
  {
    href: '/customer_returns/customer_returns-list',
    label: 'Customer returns',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBackupRestore' in icon ? icon['mdiBackupRestore' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CUSTOMER_RETURNS'
  },
  {
    href: '/customer_return_lines/customer_return_lines-list',
    label: 'Customer return 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_CUSTOMER_RETURN_LINES'
  },
  {
    href: '/purchase_orders/purchase_orders-list',
    label: 'Purchase 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_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: 'mdiFormatListText' in icon ? icon['mdiFormatListText' 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: 'mdiTruckDeliveryOutline' in icon ? icon['mdiTruckDeliveryOutline' 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: 'mdiPlaylistPlus' in icon ? icon['mdiPlaylistPlus' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RECEIPT_LINES'
  },
  {
    href: '/vendor_bills/vendor_bills-list',
    label: 'Vendor bills',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileInvoiceOutline' in icon ? icon['mdiFileInvoiceOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_VENDOR_BILLS'
  },
  {
    href: '/vendor_bill_lines/vendor_bill_lines-list',
    label: 'Vendor bill lines',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTextBoxOutline' in icon ? icon['mdiTextBoxOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_VENDOR_BILL_LINES'
  },
  {
    href: '/chart_of_accounts/chart_of_accounts-list',
    label: 'Chart of accounts',
    // 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_CHART_OF_ACCOUNTS'
  },
  {
    href: '/fiscal_periods/fiscal_periods-list',
    label: 'Fiscal periods',
    // 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_FISCAL_PERIODS'
  },
  {
    href: '/journal_entries/journal_entries-list',
    label: 'Journal entries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiScaleBalance' in icon ? icon['mdiScaleBalance' 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: 'mdiFormatAlignLeft' in icon ? icon['mdiFormatAlignLeft' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_JOURNAL_LINES'
  },
  {
    href: '/payments/payments-list',
    label: 'Payments',
    // 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_PAYMENTS'
  },
  {
    href: '/tax_rates/tax_rates-list',
    label: 'Tax rates',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPercentOutline' in icon ? icon['mdiPercentOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TAX_RATES'
  },
  {
    href: '/webhooks/webhooks-list',
    label: 'Webhooks',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWebhook' in icon ? icon['mdiWebhook' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WEBHOOKS'
  },
  {
    href: '/webhook_subscriptions/webhook_subscriptions-list',
    label: 'Webhook subscriptions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBellBadgeOutline' in icon ? icon['mdiBellBadgeOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WEBHOOK_SUBSCRIPTIONS'
  },
  {
    href: '/webhook_deliveries/webhook_deliveries-list',
    label: 'Webhook deliveries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSendCheckOutline' in icon ? icon['mdiSendCheckOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WEBHOOK_DELIVERIES'
  },
  {
    href: '/email_notifications/email_notifications-list',
    label: 'Email notifications',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiEmailOutline' in icon ? icon['mdiEmailOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EMAIL_NOTIFICATIONS'
  },
  {
    href: '/csv_import_jobs/csv_import_jobs-list',
    label: 'Csv import jobs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDelimitedOutline' in icon ? icon['mdiFileDelimitedOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CSV_IMPORT_JOBS'
  },
  {
    href: '/reports/reports-list',
    label: 'Reports',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChartBoxOutline' in icon ? icon['mdiChartBoxOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_REPORTS'
  },
  {
    href: '/dashboards/dashboards-list',
    label: 'Dashboards',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiViewDashboardOutline' in icon ? icon['mdiViewDashboardOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DASHBOARDS'
  },
  {
    href: '/dashboard_widgets/dashboard_widgets-list',
    label: 'Dashboard widgets',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWidgetsOutline' in icon ? icon['mdiWidgetsOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DASHBOARD_WIDGETS'
  },
  {
    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
