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

const Dashboard: AppRouteRecordRaw = {
  path: '/home',
  name: 'Home',
  component: DEFAULT_LAYOUT,
  meta: {
    title: '概览',
    icon: 'icon-desktop',
    hideChildrenInMenu: true,
    requiresAuth: true,
    hideTabBar: true,
    order: 1
  },
  redirect: '/home/dashboard',
  children: [
    {
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index.vue'),
      meta: {
        title: '概览',
        hideInMenu: false,
        permissions: [Domain.SYSTEM_DOMAIN_TREE],
        requiresAuth: true,
        hideTabBar: true,
        ignoreCache: true
      }
    }
  ]
}

export default Dashboard
