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: '/companies/companies-list',
    label: 'Companies',
    // 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_COMPANIES'
  },
  {
    href: '/branches/branches-list',
    label: 'Branches',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiStore' in icon ? icon['mdiStore' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BRANCHES'
  },
  {
    href: '/vehicle_categories/vehicle_categories-list',
    label: 'Vehicle categories',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCarMultiple' in icon ? icon['mdiCarMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_VEHICLE_CATEGORIES'
  },
  {
    href: '/vehicles/vehicles-list',
    label: 'Vehicles',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCar' in icon ? icon['mdiCar' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_VEHICLES'
  },
  {
    href: '/rate_plans/rate_plans-list',
    label: 'Rate plans',
    // 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_RATE_PLANS'
  },
  {
    href: '/rate_rules/rate_rules-list',
    label: 'Rate rules',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCalendarClock' in icon ? icon['mdiCalendarClock' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RATE_RULES'
  },
  {
    href: '/extras/extras-list',
    label: 'Extras',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPlusBoxMultiple' in icon ? icon['mdiPlusBoxMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EXTRAS'
  },
  {
    href: '/insurance_plans/insurance_plans-list',
    label: 'Insurance plans',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiShieldCar' in icon ? icon['mdiShieldCar' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INSURANCE_PLANS'
  },
  {
    href: '/promo_codes/promo_codes-list',
    label: 'Promo codes',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTicketPercent' in icon ? icon['mdiTicketPercent' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PROMO_CODES'
  },
  {
    href: '/bookings/bookings-list',
    label: 'Bookings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardTextClock' in icon ? icon['mdiClipboardTextClock' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BOOKINGS'
  },
  {
    href: '/booking_extras/booking_extras-list',
    label: 'Booking extras',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardPlus' in icon ? icon['mdiClipboardPlus' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BOOKING_EXTRAS'
  },
  {
    href: '/payments/payments-list',
    label: 'Payments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCreditCard' in icon ? icon['mdiCreditCard' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PAYMENTS'
  },
  {
    href: '/invoices/invoices-list',
    label: 'Invoices',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDocument' in icon ? icon['mdiFileDocument' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INVOICES'
  },
  {
    href: '/messages/messages-list',
    label: 'Messages',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMessageText' in icon ? icon['mdiMessageText' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MESSAGES'
  },
  {
    href: '/notification_templates/notification_templates-list',
    label: 'Notification templates',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTextBoxMultiple' in icon ? icon['mdiTextBoxMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_NOTIFICATION_TEMPLATES'
  },
  {
    href: '/tasks/tasks-list',
    label: 'Tasks',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCheckCircle' in icon ? icon['mdiCheckCircle' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TASKS'
  },
  {
    href: '/maintenance_records/maintenance_records-list',
    label: 'Maintenance records',
    // 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_RECORDS'
  },
  {
    href: '/customer_documents/customer_documents-list',
    label: 'Customer documents',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCardAccountDetails' in icon ? icon['mdiCardAccountDetails' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CUSTOMER_DOCUMENTS'
  },
  {
    href: '/audit_events/audit_events-list',
    label: 'Audit events',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiShieldLock' in icon ? icon['mdiShieldLock' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_AUDIT_EVENTS'
  },
  {
    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
