import Auth from '@/views/layout/auth'
import { router, rootRouter } from './routes-common'

type metaType = {
  isRegister: boolean
}

const noLoginRouter = [

]

export default [
  {
    path: '/',
    component: Auth,
    children: [
      ...router,
      {
        path: '/login',
        name: 'login',
        component: () => import('@/views/layout/login'),
        meta: {
          isRegister: false
        } as metaType
      },
      {
        path: '/home',
        name: 'home',
        component: () => import('@/student/home/index')
      },
    ]
  },
  ...noLoginRouter,
  ...rootRouter,
  {
    path: '/:pathMatch(.*)*',
    component: () => import('@/views/404'),
    meta: {
      title: '404 Not Fund',
      platform: 'STUDENT'
    }
  }
]
