import useLanguage from '@hooks/useLanguage'
import { IconDashboard } from '@tabler/icons-solidjs'
import UserHelper from '@utils/auth'
import { lazy } from 'solid-js'

const language = useLanguage()
const userHelper = new UserHelper()

console.log(userHelper.isAdmin)

export const NAV_ROUTES = [
  {
    path: '/dashboard',
    components: lazy(() => import('@pages/Dashboard')),
    filter: {},
    show: false,
    icon: IconDashboard,
    text: language?.ui.dashboard,
  },
  {
    path: '/profile',
    components: lazy(() => import('@pages/Profile')),
    filter: {},
    show: true,
    icon: IconDashboard,
    text: language?.ui.profile,
  },
]

export const ROUTES = [
  {
    path: '/',
    components: lazy(() => import('@pages/Home')),
    filter: {},
  },
  ...NAV_ROUTES,
  {
    path: '/me',
    components: lazy(() => import('@pages/Profile')),
    filter: {},
  },
]
