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

const menuAside: MenuAsideItem[] = [
  {
    href: '/play',
    icon: 'mdiGamepadSquareOutline' in icon ? icon['mdiGamepadSquareOutline' as keyof typeof icon] : icon.mdiTable,
    label: 'Play',
    permissions: 'READ_GAME_SESSIONS'
  },
  {
    href: '/play/history',
    icon: icon.mdiHistory ?? icon.mdiTable,
    label: 'Run history',
    permissions: 'READ_GAME_SESSIONS'
  },
  {
    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: '/osu_api_credentials/osu_api_credentials-list',
    label: 'Osu api credentials',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiKeyVariant' in icon ? icon['mdiKeyVariant' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_OSU_API_CREDENTIALS'
  },
  {
    href: '/api_request_logs/api_request_logs-list',
    label: 'Api request logs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiApi' in icon ? icon['mdiApi' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_API_REQUEST_LOGS'
  },
  {
    href: '/sync_jobs/sync_jobs-list',
    label: 'Sync jobs',
    // 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_SYNC_JOBS'
  },
  {
    href: '/beatmap_sets/beatmap_sets-list',
    label: 'Beatmap sets',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiImageAlbum' in icon ? icon['mdiImageAlbum' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BEATMAP_SETS'
  },
  {
    href: '/mappers/mappers-list',
    label: 'Mappers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountBadge' in icon ? icon['mdiAccountBadge' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MAPPERS'
  },
  {
    href: '/artists/artists-list',
    label: 'Artists',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMusic' in icon ? icon['mdiMusic' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ARTISTS'
  },
  {
    href: '/beatmaps/beatmaps-list',
    label: 'Beatmaps',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMusicNoteEighth' in icon ? icon['mdiMusicNoteEighth' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BEATMAPS'
  },
  {
    href: '/mapper_stats/mapper_stats-list',
    label: 'Mapper stats',
    // 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_MAPPER_STATS'
  },
  {
    href: '/artist_stats/artist_stats-list',
    label: 'Artist stats',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChartAreaspline' in icon ? icon['mdiChartAreaspline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ARTIST_STATS'
  },
  {
    href: '/game_sessions/game_sessions-list',
    label: 'Game sessions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiGamepadVariant' in icon ? icon['mdiGamepadVariant' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_GAME_SESSIONS'
  },
  {
    href: '/game_rounds/game_rounds-list',
    label: 'Game rounds',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSwapHorizontalBold' in icon ? icon['mdiSwapHorizontalBold' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_GAME_ROUNDS'
  },
  {
    href: '/leaderboard_entries/leaderboard_entries-list',
    label: 'Leaderboard entries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTrophy' in icon ? icon['mdiTrophy' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LEADERBOARD_ENTRIES'
  },
  {
    href: '/daily_seeds/daily_seeds-list',
    label: 'Daily seeds',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCalendarStar' in icon ? icon['mdiCalendarStar' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DAILY_SEEDS'
  },
  {
    href: '/server_caches/server_caches-list',
    label: 'Server caches',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiDatabaseSync' in icon ? icon['mdiDatabaseSync' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SERVER_CACHES'
  },
  {
    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
