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: '/home',
        name: 'home',
        component: () => import('@/views/home/index'),
        meta: {
          title: '首页'
        }
      },
      {
        path: '/site-management',
        name: 'site-management',
        component: () => import('@/views/site-management/index'),
        meta: {
          title: '场地管理'
        }
      },
      {
        path: '/site-settings',
        name: 'site-settings',
        component: () => import('@/views/site-management/site-settings'),
        meta: {
          title: '场地设置'
        }
      },
      {
        path: '/teacher-attendance',
        name: 'teacher-attendance',
        component: () => import('@/views/teacher-attendance'),
        meta: {
          title: '教师考勤'
        }
      },
      {
        path: '/amap-gps',
        name: 'amap-gps',
        component: () => import('@/views/teacher-attendance/amap-gps'),
        meta: {
          title: '考勤地点'
        }
      },
      {
        path: '/teacher-attendance-detail',
        name: 'teacher-attendance-detail',
        component: () => import('@/views/teacher-attendance/detail'),
        meta: {
          title: '考勤详情'
        }
      },
      {
        path: '/patrol-evaluation',
        name: 'patrol-evaluation',
        component: () => import('@/views/patrol-evaluation'),
        meta: {
          title: '巡堂评价'
        }
      },
      {
        path: '/patrol-evaluation-detail',
        name: 'patrol-evaluation-detail',
        component: () => import('@/views/patrol-evaluation/detail'),
        meta: {
          title: '巡堂评价'
        }
      },
      {
        path: '/schedule-manage',
        name: 'schedule-manage',
        component: () => import('@/views/schedule-manage'),
        meta: {
          title: '待办事项'
        }
      },
      {
        path: '/mass-message',
        name: 'mass-message',
        component: () => import('@/views/mass-message'),
        meta: {
          title: '消息群发'
        }
      },
      {
        path: '/activity-record',
        name: 'activity-record',
        component: () => import('@/views/activity-record'),
        meta: {
          title: '活动记录'
        }
      },
      {
        path: '/activity-record-detail',
        name: 'activity-record-detail',
        component: () => import('@/views/activity-record/detail'),
        meta: {
          title: '活动节目单'
        }
      },
      {
        path: '/activity-record-operation',
        name: 'activity-record-operation',
        component: () => import('@/views/activity-record/operation'),
        meta: {
          title: '新增活动'
        }
      },
      {
        path: '/schedule-manage-detail',
        name: 'schedule-manage-detail',
        component: () => import('@/views/schedule-manage/detial'),
        meta: {
          title: '退团审批'
        }
      },
      {
        path: '/student-manage',
        name: 'student-manage',
        component: () => import('@/views/student-manage'),
        meta: {
          title: '学员信息'
        }
      },
      {
        path: '/student-manage-withdraw',
        name: 'student-manage-withdraw',
        component: () => import('@/views/student-manage/withdraw'),
        meta: {
          title: '退团学员'
        }
      },
      {
        path: '/student-manage-detail',
        name: 'student-manage-detail',
        component: () => import('@/views/student-manage/detail'),
        meta: {
          title: '学员详情'
        }
      },
      {
        path: '/lesson-list',
        name: 'lesson-list',
        component: () => import('@/views/lesson-list/index'),
        meta: {
          title: '课程列表'
        }
      },
      {
        path: '/lesson-detail',
        name: 'lesson-detail',
        component: () => import('@/views/lesson-list/detail'),
        meta: {
          title: '课程详情'
        }
      }
    ]
  },
  ...rootRouter
];
