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: '/branches/branches-list',
    label: 'Branches',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiOfficeBuilding' in icon ? icon['mdiOfficeBuilding' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_BRANCHES'
  },
  {
    href: '/calendars/calendars-list',
    label: 'Calendars',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCalendar' in icon ? icon['mdiCalendar' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CALENDARS'
  },
  {
    href: '/client_status/client_status-list',
    label: 'Client status',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountCheck' in icon ? icon['mdiAccountCheck' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_CLIENT_STATUS'
  },
  {
    href: '/clients/clients-list',
    label: 'Clients',
    // 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_CLIENTS'
  },
  {
    href: '/communes/communes-list',
    label: 'Communes',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMapMarker' in icon ? icon['mdiMapMarker' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_COMMUNES'
  },
  {
    href: '/deposits/deposits-list',
    label: 'Deposits',
    // 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_DEPOSITS'
  },
  {
    href: '/districts/districts-list',
    label: 'Districts',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMapMarkerRadius' in icon ? icon['mdiMapMarkerRadius' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_DISTRICTS'
  },
  {
    href: '/document_type/document_type-list',
    label: 'Document type',
    // 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_DOCUMENT_TYPE'
  },
  {
    href: '/expense_items/expense_items-list',
    label: 'Expense items',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCurrencyUsd' in icon ? icon['mdiCurrencyUsd' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EXPENSE_ITEMS'
  },
  {
    href: '/expense_types/expense_types-list',
    label: 'Expense types',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTagTextOutline' in icon ? icon['mdiTagTextOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_EXPENSE_TYPES'
  },
  {
    href: '/group_menus/group_menus-list',
    label: 'Group menus',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMenu' in icon ? icon['mdiMenu' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_GROUP_MENUS'
  },
  {
    href: '/guarantor/guarantor-list',
    label: 'Guarantor',
    // 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_GUARANTOR'
  },
  {
    href: '/interest_rates/interest_rates-list',
    label: 'Interest rates',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiPercent' in icon ? icon['mdiPercent' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_INTEREST_RATES'
  },
  {
    href: '/loan_status/loan_status-list',
    label: 'Loan status',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCheckCircleOutline' in icon ? icon['mdiCheckCircleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LOAN_STATUS'
  },
  {
    href: '/loan_types/loan_types-list',
    label: 'Loan types',
    // 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_LOAN_TYPES'
  },
  {
    href: '/loans/loans-list',
    label: 'Loans',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCashMultiple' in icon ? icon['mdiCashMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_LOANS'
  },
  {
    href: '/members/members-list',
    label: 'Members',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountMultiple' in icon ? icon['mdiAccountMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MEMBERS'
  },
  {
    href: '/menus/menus-list',
    label: 'Menus',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMenuOpen' in icon ? icon['mdiMenuOpen' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_MENUS'
  },
  {
    href: '/payment_revenues/payment_revenues-list',
    label: 'Payment revenues',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCurrencyUsdCircle' in icon ? icon['mdiCurrencyUsdCircle' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PAYMENT_REVENUES'
  },
  {
    href: '/payment_status/payment_status-list',
    label: 'Payment status',
    // 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_PAYMENT_STATUS'
  },
  {
    href: '/payment_transactions/payment_transactions-list',
    label: 'Payment transactions',
    // 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_PAYMENT_TRANSACTIONS'
  },
  {
    href: '/payments/payments-list',
    label: 'Payments',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCreditCard' in icon ? icon['mdiCreditCard' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PAYMENTS'
  },
  {
    href: '/provinces/provinces-list',
    label: 'Provinces',
    // 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_PROVINCES'
  },
  {
    href: '/sexes/sexes-list',
    label: 'Sexes',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiGenderMaleFemale' in icon ? icon['mdiGenderMaleFemale' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SEXES'
  },
  {
    href: '/shareholders/shareholders-list',
    label: 'Shareholders',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountStar' in icon ? icon['mdiAccountStar' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SHAREHOLDERS'
  },
  {
    href: '/staff_status/staff_status-list',
    label: 'Staff status',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiCheckCircleOutline' in icon ? icon['mdiCheckCircleOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_STAFF_STATUS'
  },
  {
    href: '/staffs/staffs-list',
    label: 'Staffs',
    // 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_STAFFS'
  },
  {
    href: '/urls/urls-list',
    label: 'Urls',
    // 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_URLS'
  },
  {
    href: '/user_has_menu/user_has_menu-list',
    label: 'User has menu',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountCog' in icon ? icon['mdiAccountCog' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_USER_HAS_MENU'
  },
  {
    href: '/user_type_urls/user_type_urls-list',
    label: 'User type urls',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiLinkVariantPlus' in icon ? icon['mdiLinkVariantPlus' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_USER_TYPE_URLS'
  },
  {
    href: '/user_types/user_types-list',
    label: 'User types',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiAccountGroupOutline' in icon ? icon['mdiAccountGroupOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_USER_TYPES'
  },
  {
    href: '/villages/villages-list',
    label: 'Villages',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMapMarkerOutline' in icon ? icon['mdiMapMarkerOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_VILLAGES'
  },
  {
    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
