import Auth from '@/views/layout/auth';
import rootRouter from './router-root';

type metaType = {
  isRegister: boolean;
};

export default [
  {
    path: '/',
    component: Auth,
    children: [
      {
        path: '/login',
        name: 'login',
        component: () => import('@/views/layout/login'),
        meta: {
          isRegister: false
        } as metaType
      },
      {
        path: '/order-detail',
        name: 'order-detail',
        component: () => import('@/views/student-register/order-detail'),
        meta: {
          title: '订单详情'
        }
      },
      {
        path: '/shopAddress',
        name: 'shopAddress',
        component: () => import('@/views/student-register/shop-address/index'),
        meta: {
          title: '支付详情'
        }
      },
      {
        path: '/addressOperation',
        name: 'addressOperation',
        component: () =>
          import('@/views/student-register/shop-address/address-operation'),
        meta: {
          title: '收货地址'
        }
      },
      {
        path: '/member-center',
        name: 'member-center',
        component: () => import('@/views/member-center/index'),
        meta: {
          title: '数字化器乐学练工具'
        }
      },
      {
        path: '/exercise-record',
        name: 'exercise-record',
        component: () => import('@/views/exercise-record/exercis-detail'),
        meta: {
          title: '练习统计'
        }
      },
      {
        path: '/knowledge-library',
        name: 'knowledge-library',
        component: () => import('@/views/knowledge-library/index'),
        meta: {
          title: '知识库'
        }
      },
      {
        path: '/unit-detail',
        name: 'unit-detail',
        component: () => import('@/views/knowledge-library/unit-detail'),
        meta: {
          title: '知识库'
        }
      },
      {
        path: '/wroing-book',
        name: 'wroing-book',
        component: () => import('@/views/knowledge-library/wroing-book/index'),
        meta: {
          title: '错题本'
        }
      },
      {
        path: '/wroing-stat',
        name: 'wroing-stat',
        component: () =>
          import('@/views/knowledge-library/wroing-book/woring-stat'),
        meta: {
          title: '错题统计'
        }
      },
      {
        path: '/ai-exam',
        name: 'ai-exam',
        component: () =>
          import('@/views/knowledge-library/wroing-book/ai-exam'),
        meta: {
          title: '智能组卷'
        }
      },
      {
        path: '/practice-mode',
        name: 'practice-mode',
        component: () => import('@/views/knowledge-library/practice-mode'),
        meta: {
          title: '练习模式'
        }
      },
      {
        path: '/error-question-mode',
        name: 'error-question-mode',
        component: () =>
          import('@/views/knowledge-library/error-question-mode'),
        meta: {
          title: '错题练习'
        }
      },
      {
        path: '/examination-mode',
        name: 'examination-mode',
        component: () => import('@/views/knowledge-library/examination-mode'),
        meta: {
          title: '模拟测试'
        }
      },
      {
        path: '/courseware-list',
        name: 'courseware-list',
        component: () => import('@/views/courseware-list/index'),
        meta: {
          title: '教材列表'
        }
      },
      {
        path: '/collection-record',
        name: 'collection-record',
        component: () => import('@/views/collection-record/index'),
        meta: {
          title: '领取记录'
        }
      },
      {
        path: '/collection-record-detail',
        name: 'collection-record-detail',
        component: () => import('@/views/collection-record-detail/index'),
        meta: {
          title: '领取详情'
        }
      },
      {
        path: '/co-ai',
        component: () => import('@/views/co-ai/index'),
        meta: {
          title: '小酷AI'
        }
      }
    ]
  },
  ...rootRouter
];
