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: '/cameras_ptz/cameras_ptz-list',
    label: 'Cameras ptz',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCameraOutline' in icon
        ? icon['mdiCameraOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CAMERAS_PTZ',
  },
  {
    href: '/epcs/epcs-list',
    label: 'Epcs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiShieldCheck' in icon
        ? icon['mdiShieldCheck' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EPCS',
  },
  {
    href: '/epis/epis-list',
    label: 'Epis',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiShield' in icon
        ? icon['mdiShield' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EPIS',
  },
  {
    href: '/equipes_trabalho/equipes_trabalho-list',
    label: 'Equipes trabalho',
    // 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_EQUIPES_TRABALHO',
  },
  {
    href: '/estrutura_projeto/estrutura_projeto-list',
    label: 'Estrutura projeto',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiProjectorScreen' in icon
        ? icon['mdiProjectorScreen' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ESTRUTURA_PROJETO',
  },
  {
    href: '/etapas_ou_trechos/etapas_ou_trechos-list',
    label: 'Etapas ou trechos',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiTimeline' in icon
        ? icon['mdiTimeline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ETAPAS_OU_TRECHOS',
  },
  {
    href: '/frames_imagem/frames_imagem-list',
    label: 'Frames imagem',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiImage' in icon
        ? icon['mdiImage' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FRAMES_IMAGEM',
  },
  {
    href: '/gemeos_digitais/gemeos_digitais-list',
    label: 'Gemeos digitais',
    // 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_GEMEOS_DIGITAIS',
  },
  {
    href: '/historico_alteracoes_projeto/historico_alteracoes_projeto-list',
    label: 'Historico alteracoes projeto',
    // 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_HISTORICO_ALTERACOES_PROJETO',
  },
  {
    href: '/inspecao_aerea/inspecao_aerea-list',
    label: 'Inspecao aerea',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiDrone' in icon
        ? icon['mdiDrone' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INSPECAO_AEREA',
  },
  {
    href: '/maquinas_atividade/maquinas_atividade-list',
    label: 'Maquinas atividade',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiTractor' in icon
        ? icon['mdiTractor' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MAQUINAS_ATIVIDADE',
  },
  {
    href: '/materiais_atividade/materiais_atividade-list',
    label: 'Materiais atividade',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiPackageVariant' in icon
        ? icon['mdiPackageVariant' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MATERIAIS_ATIVIDADE',
  },
  {
    href: '/membros_equipe/membros_equipe-list',
    label: 'Membros equipe',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccount' in icon
        ? icon['mdiAccount' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MEMBROS_EQUIPE',
  },
  {
    href: '/memoriais_descritivos_asbuilt/memoriais_descritivos_asbuilt-list',
    label: 'Memoriais descritivos asbuilt',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiFileDocumentOutline' in icon
        ? icon['mdiFileDocumentOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MEMORIAIS_DESCRITIVOS_ASBUILT',
  },
  {
    href: '/modelos_bim_asbuilt/modelos_bim_asbuilt-list',
    label: 'Modelos bim asbuilt',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCubeScan' in icon
        ? icon['mdiCubeScan' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MODELOS_BIM_ASBUILT',
  },
  {
    href: '/obras/obras-list',
    label: 'Obras',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCity' in icon
        ? icon['mdiCity' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_OBRAS',
  },
  {
    href: '/permissoes_modulo/permissoes_modulo-list',
    label: 'Permissoes modulo',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiLock' in icon
        ? icon['mdiLock' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PERMISSOES_MODULO',
  },
  {
    href: '/pessoas_atividade/pessoas_atividade-list',
    label: 'Pessoas atividade',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccountTie' in icon
        ? icon['mdiAccountTie' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PESSOAS_ATIVIDADE',
  },
  {
    href: '/pessoas_frame/pessoas_frame-list',
    label: 'Pessoas frame',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccountHardHat' in icon
        ? icon['mdiAccountHardHat' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PESSOAS_FRAME',
  },
  {
    href: '/plantas_asbuilt_2d/plantas_asbuilt_2d-list',
    label: 'Plantas asbuilt 2d',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiMapOutline' in icon
        ? icon['mdiMapOutline' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PLANTAS_ASBUILT_2D',
  },
  {
    href: '/relatorio_andamento_atual/relatorio_andamento_atual-list',
    label: 'Relatorio andamento atual',
    // 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_RELATORIO_ANDAMENTO_ATUAL',
  },
  {
    href: '/relatorios_analiticos_video/relatorios_analiticos_video-list',
    label: 'Relatorios analiticos video',
    // 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_RELATORIOS_ANALITICOS_VIDEO',
  },
  {
    href: '/relatorios_diarios/relatorios_diarios-list',
    label: 'Relatorios diarios',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendarDay' in icon
        ? icon['mdiCalendarDay' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RELATORIOS_DIARIOS',
  },
  {
    href: '/relatorios_mensais/relatorios_mensais-list',
    label: 'Relatorios mensais',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendarMonth' in icon
        ? icon['mdiCalendarMonth' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RELATORIOS_MENSAIS',
  },
  {
    href: '/relatorios_semanais/relatorios_semanais-list',
    label: 'Relatorios semanais',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiCalendarWeek' in icon
        ? icon['mdiCalendarWeek' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_RELATORIOS_SEMANAIS',
  },
  {
    href: '/subcontratadas/subcontratadas-list',
    label: 'Subcontratadas',
    // 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_SUBCONTRATADAS',
  },
  {
    href: '/usuarios/usuarios-list',
    label: 'Usuarios',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon:
      'mdiAccountCircle' in icon
        ? icon['mdiAccountCircle' as keyof typeof icon]
        : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_USUARIOS',
  },
  {
    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: '/clientes/clientes-list',
    label: 'Clientes',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CLIENTES',
  },
  {
    href: '/profile',
    label: 'Profile',
    icon: icon.mdiAccountCircle,
  },

  {
    href: '/home',
    label: 'Home page',
    icon: icon.mdiHome,
    withDevider: true,
  },
  {
    href: '/api-docs',
    target: '_blank',
    label: 'Swagger API',
    icon: icon.mdiFileCode,
    permissions: 'READ_API_DOCS',
  },
];

export default menuAside;
