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

const menuAside: MenuAsideItem[] = [
  {
    href: '/dashboard',
    icon: icon.mdiViewDashboardOutline,
    label: 'Dashboard',
  },
  {
    label: 'GeoSeek Pro',
    icon: icon.mdiMapSearchOutline,
    menu: [
      { href: '/geoseek', label: 'Beranda', icon: icon.mdiViewDashboardOutline },
      { href: '/geoseek/search', label: 'Cari', icon: icon.mdiMagnify },
      { href: '/geoseek/map', label: 'Peta', icon: icon.mdiMapMarker },
      { href: '/geoseek/products', label: 'Produk', icon: icon.mdiShoppingOutline },
      { href: '/geoseek/services', label: 'Jasa', icon: icon.mdiBriefcaseSearchOutline },
      { href: '/geoseek/umkm', label: 'UMKM', icon: icon.mdiStore },
      { href: '/geoseek/culinary', label: 'Kuliner', icon: icon.mdiFoodForkDrink },
      { href: '/geoseek/health', label: 'Kesehatan', icon: icon.mdiHospitalBoxOutline },
      { href: '/geoseek/property', label: 'Properti', icon: icon.mdiHomeCityOutline },
      { href: '/geoseek/automotive', label: 'Otomotif', icon: icon.mdiCarWrench },
      { href: '/geoseek/tourism', label: 'Wisata', icon: icon.mdiBeach },
      { href: '/geoseek/events', label: 'Event', icon: icon.mdiCalendar },
      { href: '/geoseek/promos', label: 'Promo', icon: icon.mdiTicketPercentOutline },
      { href: '/geoseek/marketplace', label: 'Marketplace', icon: icon.mdiCart },
      { href: '/geoseek/booking', label: 'Booking', icon: icon.mdiCalendar },
      { href: '/geoseek/courier', label: 'Kurir', icon: icon.mdiTruck },
      { href: '/geoseek/business-dashboard', label: 'Dashboard Bisnis', icon: icon.mdiFinance },
      { href: '/geoseek/profile', label: 'Profil', icon: icon.mdiAccountCircle },
    ],
  },
  
  {
    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: '/place_categories/place_categories-list',
    label: 'Place categories',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiShape' in icon ? icon['mdiShape' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PLACE_CATEGORIES'
  },
  {
    href: '/places/places-list',
    label: 'Places',
    // 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_PLACES'
  },
  {
    href: '/place_opening_hours/place_opening_hours-list',
    label: 'Place opening hours',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiClockOutline' in icon ? icon['mdiClockOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PLACE_OPENING_HOURS'
  },
  {
    href: '/place_features/place_features-list',
    label: 'Place features',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiTagMultiple' in icon ? icon['mdiTagMultiple' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_PLACE_FEATURES'
  },
  {
    href: '/place_feature_links/place_feature_links-list',
    label: 'Place feature links',
    // 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_PLACE_FEATURE_LINKS'
  },
  {
    href: '/reviews/reviews-list',
    label: 'Reviews',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiStarOutline' in icon ? icon['mdiStarOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_REVIEWS'
  },
  {
    href: '/favorites/favorites-list',
    label: 'Favorites',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiHeartOutline' in icon ? icon['mdiHeartOutline' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_FAVORITES'
  },
  {
    href: '/search_logs/search_logs-list',
    label: 'Search logs',
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    icon: 'mdiMagnify' in icon ? icon['mdiMagnify' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
    permissions: 'READ_SEARCH_LOGS'
  },
  {
    href: '/reports/reports-list',
    label: 'Reports',
    // 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_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
