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: '/businesses/businesses-list',
    label: 'Businesses',
    // 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_BUSINESSES'
  },
  {
    href: '/branches/branches-list',
    label: 'Branches',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSourceBranch' in icon ? icon['mdiSourceBranch' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BRANCHES'
  },
  {
    href: '/fiscal_years/fiscal_years-list',
    label: 'Fiscal years',
    // 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_YEARS'
  },
  {
    href: '/user_role_assignments/user_role_assignments-list',
    label: 'User 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_USER_ROLE_ASSIGNMENTS'
  },
  {
    href: '/app_menus/app_menus-list',
    label: 'App menus',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMenu' in icon ? icon['mdiMenu' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APP_MENUS'
  },
  {
    href: '/role_permissions/role_permissions-list',
    label: 'Role permissions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiShieldKey' in icon ? icon['mdiShieldKey' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ROLE_PERMISSIONS'
  },
  {
    href: '/app_settings/app_settings-list',
    label: 'App settings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCogs' in icon ? icon['mdiCogs' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APP_SETTINGS'
  },
  {
    href: '/currencies/currencies-list',
    label: 'Currencies',
    // 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_CURRENCIES'
  },
  {
    href: '/currency_rates/currency_rates-list',
    label: 'Currency rates',
    // 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_CURRENCY_RATES'
  },
  {
    href: '/numbering_profiles/numbering_profiles-list',
    label: 'Numbering profiles',
    // 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_NUMBERING_PROFILES'
  },
  {
    href: '/widgets/widgets-list',
    label: 'Widgets',
    // 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_WIDGETS'
  },
  {
    href: '/license_customers/license_customers-list',
    label: 'License customers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountTie' in icon ? icon['mdiAccountTie' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LICENSE_CUSTOMERS'
  },
  {
    href: '/license_products/license_products-list',
    label: 'License products',
    // 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_LICENSE_PRODUCTS'
  },
  {
    href: '/license_keys/license_keys-list',
    label: 'License keys',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiLock' in icon ? icon['mdiLock' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LICENSE_KEYS'
  },
  {
    href: '/license_activations/license_activations-list',
    label: 'License activations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiKeyChain' in icon ? icon['mdiKeyChain' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LICENSE_ACTIVATIONS'
  },
  {
    href: '/counterparties/counterparties-list',
    label: 'Counterparties',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiHandshake' in icon ? icon['mdiHandshake' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COUNTERPARTIES'
  },
  {
    href: '/cost_centers/cost_centers-list',
    label: 'Cost centers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiOfficeBuildingMarker' in icon ? icon['mdiOfficeBuildingMarker' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COST_CENTERS'
  },
  {
    href: '/projects/projects-list',
    label: 'Projects',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBriefcaseOutline' in icon ? icon['mdiBriefcaseOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PROJECTS'
  },
  {
    href: '/contracts/contracts-list',
    label: 'Contracts',
    // 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_CONTRACTS'
  },
  {
    href: '/cash_boxes/cash_boxes-list',
    label: 'Cash boxes',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCashRegister' in icon ? icon['mdiCashRegister' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CASH_BOXES'
  },
  {
    href: '/banks/banks-list',
    label: 'Banks',
    // 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_BANKS'
  },
  {
    href: '/bank_accounts/bank_accounts-list',
    label: 'Bank accounts',
    // 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_BANK_ACCOUNTS'
  },
  {
    href: '/letters_of_credit/letters_of_credit-list',
    label: 'Letters of credit',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileKeyOutline' in icon ? icon['mdiFileKeyOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LETTERS_OF_CREDIT'
  },
  {
    href: '/pos_terminals/pos_terminals-list',
    label: 'Pos terminals',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCreditCardSettingsOutline' in icon ? icon['mdiCreditCardSettingsOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_POS_TERMINALS'
  },
  {
    href: '/sales_item_groups/sales_item_groups-list',
    label: 'Sales item groups',
    // 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_SALES_ITEM_GROUPS'
  },
  {
    href: '/warehouse_item_groups/warehouse_item_groups-list',
    label: 'Warehouse item groups',
    // 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_WAREHOUSE_ITEM_GROUPS'
  },
  {
    href: '/customer_groups/customer_groups-list',
    label: 'Customer groups',
    // 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_CUSTOMER_GROUPS'
  },
  {
    href: '/analytic_dimensions/analytic_dimensions-list',
    label: 'Analytic dimensions',
    // 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_ANALYTIC_DIMENSIONS'
  },
  {
    href: '/accounts/accounts-list',
    label: 'Accounts',
    // 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_ACCOUNTS'
  },
  {
    href: '/journal_voucher_types/journal_voucher_types-list',
    label: 'Journal voucher types',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDocumentMultipleOutline' in icon ? icon['mdiFileDocumentMultipleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_JOURNAL_VOUCHER_TYPES'
  },
  {
    href: '/journal_vouchers/journal_vouchers-list',
    label: 'Journal vouchers',
    // 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_JOURNAL_VOUCHERS'
  },
  {
    href: '/journal_lines/journal_lines-list',
    label: 'Journal 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_JOURNAL_LINES'
  },
  {
    href: '/approval_workflows/approval_workflows-list',
    label: 'Approval workflows',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTransitConnectionHorizontal' in icon ? icon['mdiTransitConnectionHorizontal' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APPROVAL_WORKFLOWS'
  },
  {
    href: '/workflow_steps/workflow_steps-list',
    label: 'Workflow steps',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiStepForward' in icon ? icon['mdiStepForward' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WORKFLOW_STEPS'
  },
  {
    href: '/voucher_approvals/voucher_approvals-list',
    label: 'Voucher approvals',
    // 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_VOUCHER_APPROVALS'
  },
  {
    href: '/year_end_operations/year_end_operations-list',
    label: 'Year end operations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCalendarCheckOutline' in icon ? icon['mdiCalendarCheckOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_YEAR_END_OPERATIONS'
  },
  {
    href: '/report_definitions/report_definitions-list',
    label: 'Report definitions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileChartOutline' in icon ? icon['mdiFileChartOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_REPORT_DEFINITIONS'
  },
  {
    href: '/report_runs/report_runs-list',
    label: 'Report runs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiProgressClock' in icon ? icon['mdiProgressClock' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_REPORT_RUNS'
  },
  {
    href: '/chat_conversations/chat_conversations-list',
    label: 'Chat conversations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChatOutline' in icon ? icon['mdiChatOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CHAT_CONVERSATIONS'
  },
  {
    href: '/chat_participants/chat_participants-list',
    label: 'Chat participants',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountMultipleOutline' in icon ? icon['mdiAccountMultipleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CHAT_PARTICIPANTS'
  },
  {
    href: '/chat_messages/chat_messages-list',
    label: 'Chat messages',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMessageTextOutline' in icon ? icon['mdiMessageTextOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CHAT_MESSAGES'
  },
  {
    href: '/form_alarms/form_alarms-list',
    label: 'Form alarms',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBellAlertOutline' in icon ? icon['mdiBellAlertOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FORM_ALARMS'
  },
  {
    href: '/data_export_jobs/data_export_jobs-list',
    label: 'Data export jobs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiDatabaseExportOutline' in icon ? icon['mdiDatabaseExportOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DATA_EXPORT_JOBS'
  },
  {
    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
