import LoginIndexPage from "pages/index/LoginIndexPage.vue";

import StudentMain from "pages/student/main/StudentMain.vue";
import StudentCandidateCourseListPage from "pages/student/course/StudentCandidateCourseListPage.vue";
import StudentCourseTablePage from "pages/student/schedule/StudentCourseTablePage.vue";
import StudentScorePage from "pages/student/score/StudentScorePage.vue";

import TeacherMain from "pages/teacher/main/TeacherMain.vue";
import TeacherCourseListPage from "pages/teacher/course/TeacherCourseListPage.vue";
import TeacherScorePage from "pages/teacher/score/TeacherScorePage.vue";

import AdminMain from "pages/admin/main/AdminMain.vue";
import AdminCoursePage from "pages/admin/course/AdminCoursePage.vue";
import AdminCourseSchedulePage from "pages/admin/schedule/AdminCourseSchedulePage.vue";
import AdminActivityPage from "pages/admin/activity/AdminActivityPage.vue";
import AdminStudentPage from "pages/admin/student/AdminStudentPage.vue";
import AdminTeacherPage from "pages/admin/teacher/AdminTeacherPage.vue";
import StudentCourseSelectingPage from "pages/student/course/StudentCourseSelectingnPage.vue";
import TeacherClassStudentScorePage from "pages/teacher/score/TeacherClassStudentScorePage.vue";
import AdminActivityTargetPage from "pages/admin/activity/targets/AdminActivityTargetPage.vue";
import AdminCourseSelectionStatusPage from "pages/admin/course/AdminCourseSelectionStatusPage.vue";

const studentRouter = {
  path: 'student', components: {
    root: StudentMain
  }, children: [{
    path: 'course-selecting', component: StudentCandidateCourseListPage,
  }, {
    path: 'course-selecting/select/:id(\\d+)?', component: StudentCourseSelectingPage,
  }/*, {
    path: 'course-selecting2', component: StudentCandidateCourseListPage2,
  }*/, {
    path: 'course-table', component: StudentCourseTablePage
  }, {
    path: 'score', component: StudentScorePage
  }]
}

const teacherRouter = {
  path: 'teacher', components: {
    root: TeacherMain
  }, children: [
    {
      path: 'courses', component: TeacherCourseListPage
    }, {
      path: 'score', component: TeacherScorePage
    }, {
      path: 'score/view/:id(\\d+)?', component: TeacherClassStudentScorePage
    }]
}

const adminRouter = {
  path: 'admin', components: {
    root: AdminMain
  }, children: [
    {
      path: 'course', component: AdminCoursePage
    }, {
      path: 'course/:id(\\d+)/status', component: AdminCourseSelectionStatusPage
    }, {
      path: 'schedule/:id(\\d+)?', component: AdminCourseSchedulePage
    }, {
      path: 'activity', component: AdminActivityPage
    }, {
      path: 'activity/:id(\\d+)/targets', component: AdminActivityTargetPage
    }, {
      path: 'user-teacher', component: AdminTeacherPage
    }, {
      path: 'user-student', component: AdminStudentPage
    },
  ]
}

export default [{
  path: '/', // component: LoginIndexPage,
  children: [{
    path: '/', components: {
      root: LoginIndexPage
    },
  },
    studentRouter,
    teacherRouter,
    adminRouter
  ]
}, {
  path: '/:catchAll(.*)*', component: () => import('pages/ErrorNotFound.vue')
}]
