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

const menuAside: MenuAsideItem[] = [
  {
    href: '/advisor',
    icon: icon.mdiRobotOutline,
    label: 'AI Advisor',
  },
  {
    href: '/dashboard',
    icon: icon.mdiViewDashboardOutline,
    label: 'Dashboard',
  },
  
  {
    href: '/transactions/transactions-list',
    label: 'Transactions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiSwapHorizontal ?? icon.mdiTable,
    permissions: 'READ_TRANSACTIONS'
  },
  {
    href: '/financial_accounts/financial_accounts-list',
    label: 'Financial accounts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBank' in icon ? icon['mdiBank' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FINANCIAL_ACCOUNTS'
  },
  {
    href: '/metrics_snapshots/metrics_snapshots-list',
    label: 'Financial Health',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiGauge ?? icon.mdiTable,
    permissions: 'READ_METRICS_SNAPSHOTS'
  },
  {
    href: '/alerts/alerts-list',
    label: 'Alerts & Anomalies',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: icon.mdiBellAlert ?? icon.mdiTable,
    permissions: 'READ_ALERTS'
  },
  {
    label: 'Settings',
    icon: icon.mdiCogOutline,
    menu: [
      {
        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: '/data_connections/data_connections-list',
        label: 'Data connections',
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        icon: 'mdiLinkVariant' in icon ? icon['mdiLinkVariant' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
        permissions: 'READ_DATA_CONNECTIONS'
      },
      {
        href: '/sync_jobs/sync_jobs-list',
        label: 'Sync jobs',
        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
        // @ts-ignore
        icon: 'mdiSync' in icon ? icon['mdiSync' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
        permissions: 'READ_SYNC_JOBS'
      },
    ]
  },
  {
    href: '/profile',
    label: 'Profile',
    icon: icon.mdiAccountCircle,
  },
]

export default menuAside