import * as icon from '@mdi/js';
import { MenuAsideItem } from './interfaces'

const menuAside: MenuAsideItem[] = [
  {
    href: '/dashboard',
    icon: icon.mdiViewDashboardOutline,
    label: 'Dashboard',
  },
  {
    href: '/farm-ops',
    icon: 'mdiFishbowlOutline' in icon ? icon['mdiFishbowlOutline' as keyof typeof icon] : icon.mdiFish,
    label: 'Farm Ops',
    permissions: 'READ_FEEDING_LOGS'
  },
  
  {
    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: '/user_memberships/user_memberships-list',
    label: 'User 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_USER_MEMBERSHIPS'
  },
  {
    href: '/tenant_locations/tenant_locations-list',
    label: 'Tenant 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_TENANT_LOCATIONS'
  },
  {
    href: '/ponds/ponds-list',
    label: 'Ponds',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWaves' in icon ? icon['mdiWaves' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PONDS'
  },
  {
    href: '/species/species-list',
    label: 'Species',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFish' in icon ? icon['mdiFish' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SPECIES'
  },
  {
    href: '/batches/batches-list',
    label: 'Batches',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTrayFull' in icon ? icon['mdiTrayFull' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BATCHES'
  },
  {
    href: '/feed_products/feed_products-list',
    label: 'Feed products',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSack' in icon ? icon['mdiSack' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FEED_PRODUCTS'
  },
  {
    href: '/inventory_items/inventory_items-list',
    label: 'Inventory items',
    // 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_INVENTORY_ITEMS'
  },
  {
    href: '/inventory_movements/inventory_movements-list',
    label: 'Inventory movements',
    // 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_MOVEMENTS'
  },
  {
    href: '/feeding_logs/feeding_logs-list',
    label: 'Feeding logs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFoodDrumstick' in icon ? icon['mdiFoodDrumstick' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FEEDING_LOGS'
  },
  {
    href: '/water_quality_logs/water_quality_logs-list',
    label: 'Water quality logs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWater' in icon ? icon['mdiWater' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WATER_QUALITY_LOGS'
  },
  {
    href: '/health_events/health_events-list',
    label: 'Health events',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiHospitalBox' in icon ? icon['mdiHospitalBox' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_HEALTH_EVENTS'
  },
  {
    href: '/harvests/harvests-list',
    label: 'Harvests',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFishing' in icon ? icon['mdiFishing' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_HARVESTS'
  },
  {
    href: '/marketplace_listings/marketplace_listings-list',
    label: 'Marketplace listings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiStorefront' in icon ? icon['mdiStorefront' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MARKETPLACE_LISTINGS'
  },
  {
    href: '/orders/orders-list',
    label: 'Orders',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCart' in icon ? icon['mdiCart' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ORDERS'
  },
  {
    href: '/order_items/order_items-list',
    label: 'Order items',
    // 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_ORDER_ITEMS'
  },
  {
    href: '/payment_transactions/payment_transactions-list',
    label: 'Payment transactions',
    // 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_PAYMENT_TRANSACTIONS'
  },
  {
    href: '/shipment_updates/shipment_updates-list',
    label: 'Shipment updates',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTruckDelivery' in icon ? icon['mdiTruckDelivery' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SHIPMENT_UPDATES'
  },
  {
    href: '/investments/investments-list',
    label: 'Investments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChartLine' in icon ? icon['mdiChartLine' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INVESTMENTS'
  },
  {
    href: '/api_keys/api_keys-list',
    label: 'Api keys',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiKey' in icon ? icon['mdiKey' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_API_KEYS'
  },
  {
    href: '/webhook_endpoints/webhook_endpoints-list',
    label: 'Webhook endpoints',
    // 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_WEBHOOK_ENDPOINTS'
  },
  {
    href: '/webhook_deliveries/webhook_deliveries-list',
    label: 'Webhook deliveries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSend' in icon ? icon['mdiSend' 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: 'mdiEmail' in icon ? icon['mdiEmail' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EMAIL_NOTIFICATIONS'
  },
  {
    href: '/audit_logs/audit_logs-list',
    label: 'Audit logs',
    // 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_AUDIT_LOGS'
  },
  {
    href: '/csv_jobs/csv_jobs-list',
    label: 'Csv jobs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDelimited' in icon ? icon['mdiFileDelimited' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CSV_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
