/* Layout */
import Layout from '@/layout'

// 机构认证审核路由
const clubAuditRoutes = [
  {
    path: 'club',
    component: () => import('@/views/admin/audit/club'),
    name: 'AuditClub',
    meta: { title: '机构认证', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club1' }
  },
  {
    path: 'club-list',
    hidden: true,
    component: () => import('@/views/admin/audit/club/list'),
    name: 'AuditClubList',
    meta: { title: '机构认证审核', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club2' }
  },
  {
    path: 'club-detail',
    hidden: true,
    component: () => import('@/views/admin/audit/club/review'),
    name: 'AuditClubDetail',
    meta: { title: '机构认证审核详情', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club3' }
  },
  {
    path: 'club-device-list',
    hidden: true,
    component: () => import('@/views/admin/audit/club/device'),
    name: 'AuditClubDeviceList',
    meta: { title: '设备审核列表', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club4' }
  },
  {
    path: 'club-device-detail',
    hidden: true,
    component: () => import('@/views/admin/audit/club/device/review'),
    name: 'AuditClubDeviceDetail',
    meta: { title: '设备审核详情', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club4' }
  }
]

// 医师资料审核
const doctorAuditRoutes = [
  {
    path: 'doctor',
    component: () => import('@/views/admin/audit/doctor'),
    name: 'AuditDoctor',
    meta: { title: '医师认证', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club6' }
  },
  {
    path: 'doctor-list',
    hidden: true,
    component: () => import('@/views/admin/audit/doctor/list'),
    name: 'AuditDoctorList',
    meta: { title: '医师审核列表', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club7' }
  },
  {
    path: 'doctor-detail',
    hidden: true,
    component: () => import('@/views/admin/audit/doctor/review'),
    name: 'AuditDoctorDetail',
    meta: { title: '医师审核详情', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club8' }
  }
]

// 资料库审核
const materialAuditRoutes = [
  {
    path: 'material',
    component: () => import('@/views/admin/audit/material'),
    name: 'AuditMaterial',
    meta: { title: '资料库', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club9' }
  },
  {
    path: 'material/article-list',
    component: () => import('@/views/admin/audit/material/article'),
    name: 'AuditMaterialArticleList',
    hidden: true,
    meta: { title: '文章审核列表', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club10' }
  },
  {
    path: 'material/article-detail',
    component: () => import('@/views/admin/audit/material/article/review'),
    name: 'AuditMaterialArticleDetail',
    hidden: true,
    meta: { title: '审核文章', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club11' }
  },
  {
    path: 'material/image-list',
    component: () => import('@/views/admin/audit/material/image'),
    name: 'AuditMaterialImageList',
    hidden: true,
    meta: { title: '图片审核列表', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club12' }
  },
  {
    path: 'material/image-detail',
    component: () => import('@/views/admin/audit/material/image/review'),
    name: 'AuditMaterialImageDetail',
    hidden: true,
    meta: { title: '审核图片', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club3' }
  },
  {
    path: 'material/video-list',
    component: () => import('@/views/admin/audit/material/video'),
    name: 'AuditMaterialVideoList',
    hidden: true,
    meta: { title: '视频审核列表', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club4' }
  },
  {
    path: 'material/file-list',
    component: () => import('@/views/admin/audit/material/file'),
    name: 'AuditMaterialFileList',
    hidden: true,
    meta: { title: '文件审核列表', icon: 'el-icon-menu', roles: ['admin'], noCache: true, id: 'club5' }
  }
]

// 审核页面路由
const AuditRoutes = [
  {
    path: '/audit',
    component: Layout,
    alwaysShow: true,
    name: 'Audit',
    meta: { title: '审核管理', icon: 'el-icon-s-check', roles: ['admin'], noCache: true },
    children: [...clubAuditRoutes, ...doctorAuditRoutes, ...materialAuditRoutes]
  }
]

export default AuditRoutes
