import Vue from 'vue'
import Router from 'vue-router'
import login from '@/containers/login/login'
// import Register from '@/containers/register/registation'
import Register from '@/containers/register/register.vue'
import Reset from '@/containers/reset/reset'

import Debug from '@/containers/debug/index'
import main from '@/containers/main/main'
import center from '@/containers/center/center'

import Play from '@/containers/center/play/index.vue'

import Index from '@/containers/main/index/index'
import Profile from '@/containers/main/profile/profile'

import Apply from '@/containers/main/apply/apply'
import PostList from '@/containers/main/post/list'
import PostInfo from '@/containers/main/post/info'
import HelpList from '@/containers/main/help/list'
import AboutMe from '@/containers/main/about/aboutMe'

import Verify from '@/containers/main/verify/index'

import CenterHome from '@/containers/center/home/index'
import CenterSetting from '@/containers/center/setting/index'
import CenterTrain from '@/containers/center/class/train/index'
import CenterOffline from '@/containers/center/class/offline/index'

import CenterStudyArchives from '@/containers/center/studyArchives/index'
import CenterMyNotes from '@/containers/center/myNotes/index'
import CenterMyOrder from '@/containers/center/myOrder/index'
import CenterMessage from '@/containers/center/message/index'
import CenterSign from '@/containers/center/sign/index'

import CenterMarket from '@/containers/center/market/index'
import CenterExam from '@/containers/center/exam/index'



import CenterXinpeiInfo from '@/containers/center/xinpei/info'
import CenterXinpeiScore from '@/containers/center/xinpei/score'
import CenterXinpeiService from '@/containers/center/xinpei/service'
import CenterXinpeiCandidates from '@/containers/center/xinpei/candidates'
import CenterXinpeiTicket from '@/containers/center/xinpei/ticket'

import CenterXinpeiOrder from '@/containers/center/xinpei/order'



// import Test from '@/containers/test/index'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'login',
      component: login,
    },
    {
      path: '/register',
      name: 'register',
      component: Register,
    },
    {
      path: '/reset',
      name: 'reset',
      component: Reset,
    },
    // {
    //   path: '/debug/:id',
    //   name: 'debug',
    //   component: Debug,
    // },
    // {
    //   path: '/test',
    //   name: 'test',
    //   component: Test,
    // },

    {
      path: '/main',
      name: 'main',
      component: main,
      children: [{
          path: 'index',
          component: Index,
        },

        {
          path: 'about',
          component: AboutMe,
        },
        {
          path: 'profile',
          component: Profile,
        },
        {
          path: 'apply',
          component: Apply,
        },
        {
          path: 'postlist/:type',
          component: PostList,
        },
        {
          path: 'post/:postId',
          component: PostInfo,
        },
        {
          path: 'help',
          component: HelpList,
        },
        {
          path: 'verify',
          component: Verify,
        }
      ]
    },

    {
      path: '/center',
      name: 'center',
      component: center,
      children: [{
          path: 'home',
          component: CenterHome,
        },
        {
          path: 'class/train',
          component: CenterTrain,
        },
        {
          path: 'class/offline',
          component: CenterOffline,
        },
        {
          path: 'play/:courseId',
          name: 'play',
          component: Play,
        },
        {
          path: 'studyArchives',
          component: CenterStudyArchives,
        },
        {
          path: 'myOrder',
          component: CenterMyOrder,
        },
        {
          path: 'myNotes',
          component: CenterMyNotes,
        },
        {
          path: 'message',
          component: CenterMessage,
        },
        {
          path: 'xinpei/candidates',
          component: CenterXinpeiCandidates,
        },
        {
          path: 'xinpei/info',
          component: CenterXinpeiInfo,
        },
        {
          path: 'xinpei/service',
          component: CenterXinpeiService,
        },
        {
          path: 'xinpei_ticket',
          component: CenterXinpeiTicket,
        },
        {
          path: 'xinpei/order',
          component: CenterXinpeiOrder
        },
        {
          path: 'xinpei/score',
          component: CenterXinpeiScore,
        },
        {
          path: 'exam/:courseId',
          component: CenterExam,
        },
        {
          path: 'market',
          component: CenterMarket,
        },
        {
          path: 'sign',
          component: CenterSign,
        },
        {
          path: 'setting',
          component: CenterSetting,
        }
      ],
    }
  ]
})
