import type { RouteDefinition } from '@solidjs/router'
import Index from './pages/IndexPage/Index'
// @ts-ignore
import { lazy } from 'solid-js'

export const routes: RouteDefinition[] = [
  {
    path: '/',
    component: Index,
  },
  {
    path: '/main',
    component: lazy(() => import('./pages/MainPage/Main')),
  },
  {
    path: '/register',
    component: lazy(() => import('./pages/RegisterPage/Register.tsx')),
  },
  {
    path: '/login',
    component: lazy(() => import('./pages/LoginPage/Login.tsx')),
  },
  {
    path: '/assessor',
    component: lazy(() => import('./pages/AssessorPage/Assessor.tsx')),
  },
  {
    path: '/profile',
    component: lazy(() => import('./pages/ProfilePage/Profile.tsx')),
  },
  {
    path: '**',
    component: lazy(() => import('./errors/404')),
  },
]
