import { DEFAULT_LAYOUT } from '@/router/constants'
import { Project } from '@/enums/api'
import { AppRouteRecordRaw } from '../types'

const DocumentCenter: AppRouteRecordRaw = {
  path: '/document-center',
  name: 'DocumentCenter',
  component: DEFAULT_LAYOUT,
  meta: {
    title: '文档中心',
    icon: 'icon-folder',
    iSize: 22,
    requiresAuth: true,
    order: 8
  },
  children: [
    {
      path: 'document-archive',
      name: 'DocumentArchive',
      component: () => import('@/views/document-center/archive/index.vue'),
      meta: {
        title: '项目归档',
        permissions: [Project.PROJECT_DOC_LIST],
        requiresAuth: true,
        ignoreCache: true,
        hideTabBar: true
      }
    }
  ]
}

export default DocumentCenter
