import DEFAULT from '@/layouts/default';
import ANSWER from '@/layouts/answer';

/**
 * 练习管理创建
 */
const ExerciseCreatePage = {
  path: '/exercise',
  component: DEFAULT,
  redirect: '/exercise/create',
  children: [
    {
      path: 'create',
      component: () => import('@/views/exercise_questions/create/index.vue'),
    },
  ],
};

/**
 * 练习题答题
 */
const AnswerPage = {
  path: '/answer',
  component: ANSWER,
  redirect: 'Answer',
  children: [
    {
      path: '/answer',
      name: 'Answer',
      component: () => import('@/views/exercise_questions/answer/index.vue'),
    },
  ],
};

/**
 * 答题记录列表
 */
const AnswerRecordList = {
  path: '/answer_record_list',
  component: ANSWER,
  redirect: 'AnswerRecordList',
  children: [
    {
      path: '/answer_record_list',
      name: 'AnswerRecordList',
      component: () => import('@/views/home/recovery/AnswerRecordList.vue'),
    },
  ],
};

/**
 * 练习题题目答题用户列表
 */
const ExerciseAnswerUserList = {
  path: '/exercise_answer_user_list',
  component: ANSWER,
  redirect: 'ExerciseAnswerUserList',
  children: [
    {
      path: '/exercise_answer_user_list',
      name: 'ExerciseAnswerUserList',
      component: () => import('@/views/home/recovery/ExerciseAnswerUserList.vue'),
    },
  ],
};

export default [ExerciseCreatePage, AnswerPage, AnswerRecordList, ExerciseAnswerUserList];
