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: '/document_types/document_types-list',
    label: 'Document types',
    // 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_DOCUMENT_TYPES'
  },
  {
    href: '/standards/standards-list',
    label: 'Standards',
    // 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_STANDARDS'
  },
  {
    href: '/clauses/clauses-list',
    label: 'Clauses',
    // 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_CLAUSES'
  },
  {
    href: '/document_templates/document_templates-list',
    label: 'Document templates',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDocumentEditOutline' in icon ? icon['mdiFileDocumentEditOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DOCUMENT_TEMPLATES'
  },
  {
    href: '/documents/documents-list',
    label: 'Documents',
    // 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_DOCUMENTS'
  },
  {
    href: '/document_versions/document_versions-list',
    label: 'Document versions',
    // 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_DOCUMENT_VERSIONS'
  },
  {
    href: '/change_requests/change_requests-list',
    label: 'Change requests',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileReplaceOutline' in icon ? icon['mdiFileReplaceOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CHANGE_REQUESTS'
  },
  {
    href: '/approval_workflows/approval_workflows-list',
    label: 'Approval workflows',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTransitConnectionVariant' in icon ? icon['mdiTransitConnectionVariant' 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: 'mdiPlaylistCheck' in icon ? icon['mdiPlaylistCheck' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APPROVAL_STEPS'
  },
  {
    href: '/approval_tasks/approval_tasks-list',
    label: 'Approval tasks',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardTextClockOutline' in icon ? icon['mdiClipboardTextClockOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_APPROVAL_TASKS'
  },
  {
    href: '/esignature_events/esignature_events-list',
    label: 'Esignature events',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiDrawPen' in icon ? icon['mdiDrawPen' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ESIGNATURE_EVENTS'
  },
  {
    href: '/training_courses/training_courses-list',
    label: 'Training courses',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSchoolOutline' in icon ? icon['mdiSchoolOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TRAINING_COURSES'
  },
  {
    href: '/training_assignments/training_assignments-list',
    label: 'Training assignments',
    // 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_TRAINING_ASSIGNMENTS'
  },
  {
    href: '/products/products-list',
    label: 'Products',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCubeOutline' in icon ? icon['mdiCubeOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PRODUCTS'
  },
  {
    href: '/suppliers/suppliers-list',
    label: 'Suppliers',
    // 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_SUPPLIERS'
  },
  {
    href: '/batches/batches-list',
    label: 'Batches',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBarcode' in icon ? icon['mdiBarcode' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BATCHES'
  },
  {
    href: '/certificates_of_analysis/certificates_of_analysis-list',
    label: 'Certificates of analysis',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCertificateOutline' in icon ? icon['mdiCertificateOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CERTIFICATES_OF_ANALYSIS'
  },
  {
    href: '/device_master_records/device_master_records-list',
    label: 'Device master records',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBookMultipleOutline' in icon ? icon['mdiBookMultipleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DEVICE_MASTER_RECORDS'
  },
  {
    href: '/risk_assessments/risk_assessments-list',
    label: 'Risk assessments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiShieldAlertOutline' in icon ? icon['mdiShieldAlertOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RISK_ASSESSMENTS'
  },
  {
    href: '/risk_items/risk_items-list',
    label: 'Risk items',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAlertOctagonOutline' in icon ? icon['mdiAlertOctagonOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RISK_ITEMS'
  },
  {
    href: '/capas/capas-list',
    label: 'Capas',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardAlertOutline' in icon ? icon['mdiClipboardAlertOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CAPAS'
  },
  {
    href: '/nonconformances/nonconformances-list',
    label: 'Nonconformances',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCloseOctagonOutline' in icon ? icon['mdiCloseOctagonOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_NONCONFORMANCES'
  },
  {
    href: '/complaints/complaints-list',
    label: 'Complaints',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMessageAlertOutline' in icon ? icon['mdiMessageAlertOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COMPLAINTS'
  },
  {
    href: '/audits/audits-list',
    label: 'Audits',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClipboardSearchOutline' in icon ? icon['mdiClipboardSearchOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_AUDITS'
  },
  {
    href: '/audit_findings/audit_findings-list',
    label: 'Audit findings',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAlertCircleOutline' in icon ? icon['mdiAlertCircleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_AUDIT_FINDINGS'
  },
  {
    href: '/management_reviews/management_reviews-list',
    label: 'Management reviews',
    // 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_MANAGEMENT_REVIEWS'
  },
  {
    href: '/regulatory_submissions/regulatory_submissions-list',
    label: 'Regulatory submissions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileSendOutline' in icon ? icon['mdiFileSendOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_REGULATORY_SUBMISSIONS'
  },
  {
    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: '/profile',
    label: 'Profile',
    icon: icon.mdiAccountCircle,
  },

 
  {
    href: '/api-docs',
    target: '_blank',
    label: 'Swagger API',
    icon: icon.mdiFileCode,
    permissions: 'READ_API_DOCS'
  },
]

export default menuAside
