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: '/billing_customers/billing_customers-list',
    label: 'Billing customers',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCreditCardOutline' in icon ? icon['mdiCreditCardOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BILLING_CUSTOMERS'
  },
  {
    href: '/subscriptions/subscriptions-list',
    label: 'Subscriptions',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiReceiptTextOutline' in icon ? icon['mdiReceiptTextOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SUBSCRIPTIONS'
  },
  {
    href: '/trading_accounts/trading_accounts-list',
    label: 'Trading accounts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiWalletOutline' in icon ? icon['mdiWalletOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TRADING_ACCOUNTS'
  },
  {
    href: '/instruments/instruments-list',
    label: 'Instruments',
    // 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_INSTRUMENTS'
  },
  {
    href: '/setups/setups-list',
    label: 'Setups',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiLightbulbOutline' in icon ? icon['mdiLightbulbOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SETUPS'
  },
  {
    href: '/tags/tags-list',
    label: 'Tags',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTagOutline' in icon ? icon['mdiTagOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TAGS'
  },
  {
    href: '/trades/trades-list',
    label: 'Trades',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiSwapHorizontal' in icon ? icon['mdiSwapHorizontal' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TRADES'
  },
  {
    href: '/trade_attachments/trade_attachments-list',
    label: 'Trade attachments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiImageMultipleOutline' in icon ? icon['mdiImageMultipleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TRADE_ATTACHMENTS'
  },
  {
    href: '/trade_rules/trade_rules-list',
    label: 'Trade rules',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiGavel' in icon ? icon['mdiGavel' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TRADE_RULES'
  },
  {
    href: '/trade_rule_checks/trade_rule_checks-list',
    label: 'Trade rule checks',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiChecklist' in icon ? icon['mdiChecklist' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_TRADE_RULE_CHECKS'
  },
  {
    href: '/mood_entries/mood_entries-list',
    label: 'Mood entries',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiEmoticonOutline' in icon ? icon['mdiEmoticonOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MOOD_ENTRIES'
  },
  {
    href: '/goals/goals-list',
    label: 'Goals',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTarget' in icon ? icon['mdiTarget' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_GOALS'
  },
  {
    href: '/milestones/milestones-list',
    label: 'Milestones',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFlagOutline' in icon ? icon['mdiFlagOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MILESTONES'
  },
  {
    href: '/watchlist_items/watchlist_items-list',
    label: 'Watchlist items',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiEyeOutline' in icon ? icon['mdiEyeOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_WATCHLIST_ITEMS'
  },
  {
    href: '/economic_events/economic_events-list',
    label: 'Economic events',
    // 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_ECONOMIC_EVENTS'
  },
  {
    href: '/csv_import_jobs/csv_import_jobs-list',
    label: 'Csv import jobs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFileUploadOutline' in icon ? icon['mdiFileUploadOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CSV_IMPORT_JOBS'
  },
  {
    href: '/csv_import_row_errors/csv_import_row_errors-list',
    label: 'Csv import row errors',
    // 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_CSV_IMPORT_ROW_ERRORS'
  },
  {
    href: '/broker_connections/broker_connections-list',
    label: 'Broker 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_BROKER_CONNECTIONS'
  },
  {
    href: '/trade_sync_runs/trade_sync_runs-list',
    label: 'Trade sync runs',
    // 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_TRADE_SYNC_RUNS'
  },
  {
    href: '/ai_insight_runs/ai_insight_runs-list',
    label: 'Ai insight runs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiRobotOutline' in icon ? icon['mdiRobotOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_AI_INSIGHT_RUNS'
  },
  {
    href: '/ai_insight_items/ai_insight_items-list',
    label: 'Ai insight items',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBrain' in icon ? icon['mdiBrain' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_AI_INSIGHT_ITEMS'
  },
  {
    href: '/alert_rules/alert_rules-list',
    label: 'Alert rules',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBellAlertOutline' in icon ? icon['mdiBellAlertOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ALERT_RULES'
  },
  {
    href: '/alerts/alerts-list',
    label: 'Alerts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiBellOutline' in icon ? icon['mdiBellOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_ALERTS'
  },
  {
    href: '/dashboard_widgets/dashboard_widgets-list',
    label: 'Dashboard widgets',
    // 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_WIDGETS'
  },
  {
    href: '/pdf_reports/pdf_reports-list',
    label: 'Pdf reports',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiFilePdfBox' in icon ? icon['mdiFilePdfBox' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PDF_REPORTS'
  },
  {
    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
