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

// 资料管理页面路由
const materialRoutes = [
  {
    path: '/material',
    component: Layout,
    alwaysShow: true,
    redirect: '/material/article-list',
    name: 'Material',
    meta: { title: '资料库', icon: 'el-icon-s-management', roles: ['normal'], noCache: true, proxy: true },
    children: [
      {
        path: 'article-list',
        component: () => import('@/views/normal/material/article'),
        name: 'MaterialArticleList',
        meta: { title: '文章列表', icon: 'el-icon-tickets', roles: ['normal'], noCache: true, proxy: true }
      },
      {
        path: 'article-edit',
        component: () => import('@/views/normal/material/article/edit'),
        hidden: true,
        name: 'MaterialArticleEdit',
        meta: { title: '编辑文章', icon: 'el-icon-menu', roles: ['normal'], noCache: true, proxy: true }
      },
      {
        path: 'image-list',
        component: () => import('@/views/normal/material/image'),
        name: 'MaterialImageList',
        meta: { title: '图片列表', icon: 'el-icon-picture-outline', roles: ['normal'], noCache: true, proxy: true }
      },
      {
        path: 'image-edit',
        component: () => import('@/views/normal/material/image/edit'),
        hidden: true,
        name: 'MaterialImageEdit',
        meta: { title: '编辑图片', icon: 'el-icon-menu', roles: ['normal'], noCache: true, proxy: true }
      },
      {
        path: 'video-list',
        component: () => import('@/views/normal/material/video'),
        name: 'MaterialVideoList',
        meta: { title: '视频列表', icon: 'el-icon-video-camera', roles: ['normal'], noCache: true, proxy: true }
      },
      {
        path: 'file-list',
        component: () => import('@/views/normal/material/file'),
        name: 'MaterialFileList',
        meta: { title: '文件列表', icon: 'el-icon-receiving', roles: ['normal'], noCache: true, proxy: true }
      }
    ]
  }
]

export default materialRoutes
