import type { AppRouteModule } from '/@/router/types'

import { LAYOUT } from '/@/router/constant'
import { RoleEnum } from '/@/enums/roleEnum'
// import { t } from '/@/hooks/web/useI18n'

const dashboard: AppRouteModule = {
  path: '/dashboard',
  name: 'Dashboard',
  component: LAYOUT,
  redirect: '/dashboard/main',
  meta: {
    title: '项目'
  },
  children: [
    {
      path: 'main',
      name: 'Workbench',
      component: () => import('/@/views/dashboard/workbench/index.vue'),
      meta: {
        icon: 'clarity:users-solid-badged',
        title: '项目',
        roles: [RoleEnum.ADMIN, RoleEnum.SHOWPROJECT]
      }
    },
    {
      path: 'project/:id',
      name: 'Project',
      component: () => import('/@/views/dashboard/project-detail/index.vue'),
      meta: {
        title: '项目详情',
        hideMenu: true,
        roles: [RoleEnum.ADMIN, RoleEnum.SHOWPROJECT]
      }
    }
  ]
}

export default dashboard
