import App from '../App'

const login = r => require.ensure([], () => r(require('../views/login')), 'login')

const home = r => require.ensure([], () => r(require('../views/home')), 'home')
const blank = r => require.ensure([], () => r(require('../views/blank')), 'blank')
const itemManager = r => require.ensure([], () => r(require('../views/education/item-manager.vue')), 'item-manager')
const itemComponent = r => require.ensure([], () => r(require('../views/education/item-component.vue')), 'item-component')
const createComponent = r => require.ensure([], () => r(require('../views/education/create-component.vue')),'create-component')
const roleManager = r => require.ensure([], () => r(require('../views/system/role.vue')),'role')
const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager')
const editManager = r => require.ensure([], () => r(require('../views/education/edit-manager.vue')), 'edit-manager')
const itemRole = r => require.ensure([], () => r(require('../views/system/item-role.vue')), 'item-role')
const msgPush = r => require.ensure([], () => r(require('../views/msgpush/msg-push.vue')), 'msg-push')

import patientsRouters from './patients'
import followRouters from './follow'

const reportLis = r => require.ensure([], () => r(require('../views/learning/report-list.vue')), 'report-list')
const itemList = r => require.ensure([], () => r(require('../views/learning/item-list.vue')), 'item-list')
const nameList = r => require.ensure([], () => r(require('../views/learning/name-list.vue')), 'name-list')
const dataAlignment = r => require.ensure([], () => r(require('../views/learning/data-alignment.vue')), 'data-alignment')
const exportDownload = r => require.ensure([], () => r(require('../views/learning/export-download.vue')), 'export-download')

const itemShield = r => require.ensure([], () => r(require('../views/education/item-shield.vue')), 'item-shield')
const entryManager = r => require.ensure([], () => r(require('../views/education/entry-manager.vue')), 'entry-manager')
const editEntry = r => require.ensure([], () => r(require('../views/education/edit-entry.vue')), 'edit-entry')
const editNotice = r => require.ensure([], () => r(require('../views/education/edit-notice.vue')), 'edit-notice')

const creditManage = r => require.ensure([], () => r(require('../views/cme/credit-manage.vue')), 'credit-manage')
const reviewAccessManage = r => require.ensure([], () => r(require('../views/cme/review-access-manage.vue')), 'review-access-manage')
const creditSendManage = r => require.ensure([], () => r(require('../views/cme/credit-send-manage.vue')), 'credit-send-manage')
const applyDetail =  r => require.ensure([], () => r(require('../views/cme/apply-detail.vue')), 'apply-detail')

export default [{
    path: '/',
    component: App,
    children: [
        {
          path: '/login',
          component: login,
          name: 'loginPage',
        },
        {
            path: '',
            redirect: '/home'
        },{
            path: '/index',
            component: home
        },{
            path: '/home',
            component: home
        },{
            path: '/blank',
            component: blank
        },{
            path: '/item-manager',
            component: itemManager
        },{
            path: '/add-manager',
            component: addManager
        },{
            path: '/edit-manager',
            component: editManager
        },{
            path: '/item-component',
            component: itemComponent
        },{
            path: '/role',
            component: roleManager
        },{
            path: '/create-component',
            component: createComponent
        },{
            path: '/item-role',
            component: itemRole
        },{
            path: '/report-list',
            component: reportLis
        },{
            path: '/item-list',
            component: itemList
        },{
            path: '/data-alignment',
            component: dataAlignment
        },{
            path: '/name-list',
            component: nameList
        },
        {
            path: '/export-download',
            component: exportDownload
        },
        {
            path: '/item-shield',
            component: itemShield,
        },
        {
            path: '/entry-manager',
            component: entryManager,
        },
        {
            path: '/edit-entry',
            component: editEntry,
        },
        {
            path: '/msg-push',
            component: msgPush,
            // redirect: 'msgpush/msg-push',
        },
        {
            path: '/edit-notice',
            component: editNotice,
            // redirect: 'msgpush/msg-push',
        },
        {
            path: '/credit-manage',
            component: creditManage,
        },
        {
            path: '/review-access-manage',
            component: reviewAccessManage,
        },
        {
            path: '/credit-send-manage',
            component: creditSendManage,
        },
        {
            path: '/apply-detail',
            component: applyDetail,
        },
      // {
      //   path: '/followup',
      //   name: 'followUp',
      //   component: followUp,
      //   redirect: 'followup/plan-manage/planList',
      // },
        followRouters,
        patientsRouters,
    ]
  }]
