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: '/workspaces/workspaces-list',
    label: 'Workspaces',
    // 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_WORKSPACES'
  },
  {
    href: '/workspace_memberships/workspace_memberships-list',
    label: 'Workspace memberships',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountGroup' in icon ? icon['mdiAccountGroup' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WORKSPACE_MEMBERSHIPS'
  },
  {
    href: '/subjects/subjects-list',
    label: 'Subjects',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBookEducation' in icon ? icon['mdiBookEducation' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SUBJECTS'
  },
  {
    href: '/topics/topics-list',
    label: 'Topics',
    // 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_TOPICS'
  },
  {
    href: '/pages/pages-list',
    label: 'Pages',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileDocumentMultiple' in icon ? icon['mdiFileDocumentMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PAGES'
  },
  {
    href: '/blocks/blocks-list',
    label: 'Blocks',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiViewSequential' in icon ? icon['mdiViewSequential' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BLOCKS'
  },
  {
    href: '/databases/databases-list',
    label: 'Databases',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiDatabase' in icon ? icon['mdiDatabase' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DATABASES'
  },
  {
    href: '/database_entries/database_entries-list',
    label: 'Database entries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTableLarge' in icon ? icon['mdiTableLarge' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DATABASE_ENTRIES'
  },
  {
    href: '/sources/sources-list',
    label: 'Sources',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileUpload' in icon ? icon['mdiFileUpload' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SOURCES'
  },
  {
    href: '/source_chunks/source_chunks-list',
    label: 'Source chunks',
    // 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_SOURCE_CHUNKS'
  },
  {
    href: '/ai_jobs/ai_jobs-list',
    label: 'Ai jobs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiRobot' in icon ? icon['mdiRobot' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_AI_JOBS'
  },
  {
    href: '/concept_maps/concept_maps-list',
    label: 'Concept maps',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiGraph' in icon ? icon['mdiGraph' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CONCEPT_MAPS'
  },
  {
    href: '/study_guides/study_guides-list',
    label: 'Study guides',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiNotebookEdit' in icon ? icon['mdiNotebookEdit' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_STUDY_GUIDES'
  },
  {
    href: '/flashcard_decks/flashcard_decks-list',
    label: 'Flashcard decks',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCards' in icon ? icon['mdiCards' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FLASHCARD_DECKS'
  },
  {
    href: '/flashcards/flashcards-list',
    label: 'Flashcards',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCardText' in icon ? icon['mdiCardText' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FLASHCARDS'
  },
  {
    href: '/spaced_repetition_states/spaced_repetition_states-list',
    label: 'Spaced repetition states',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTimerSand' in icon ? icon['mdiTimerSand' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SPACED_REPETITION_STATES'
  },
  {
    href: '/study_sessions/study_sessions-list',
    label: 'Study sessions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTimer' in icon ? icon['mdiTimer' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_STUDY_SESSIONS'
  },
  {
    href: '/review_events/review_events-list',
    label: 'Review events',
    // 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_REVIEW_EVENTS'
  },
  {
    href: '/quizzes/quizzes-list',
    label: 'Quizzes',
    // 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_QUIZZES'
  },
  {
    href: '/quiz_questions/quiz_questions-list',
    label: 'Quiz questions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiHelpCircleOutline' in icon ? icon['mdiHelpCircleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_QUIZ_QUESTIONS'
  },
  {
    href: '/quiz_attempts/quiz_attempts-list',
    label: 'Quiz attempts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiProgressCheck' in icon ? icon['mdiProgressCheck' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_QUIZ_ATTEMPTS'
  },
  {
    href: '/tutor_conversations/tutor_conversations-list',
    label: 'Tutor conversations',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChatProcessing' in icon ? icon['mdiChatProcessing' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TUTOR_CONVERSATIONS'
  },
  {
    href: '/tutor_messages/tutor_messages-list',
    label: 'Tutor 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_TUTOR_MESSAGES'
  },
  {
    href: '/study_plans/study_plans-list',
    label: 'Study plans',
    // 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_STUDY_PLANS'
  },
  {
    href: '/study_plan_items/study_plan_items-list',
    label: 'Study plan items',
    // 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_STUDY_PLAN_ITEMS'
  },
  {
    href: '/dashboard_snapshots/dashboard_snapshots-list',
    label: 'Dashboard snapshots',
    // 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_DASHBOARD_SNAPSHOTS'
  },
  {
    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
