// 所有菜单路由
import sysRoutes from './system'
import type { Route } from '@/global'
import baseRoutes from './basic'
import dataRoutes from './data'
const Layout = () => import('@/layouts/index.vue')

const routes: Route.recordRaw[] = [
  {
    path: '/dashboard',
    component: Layout,
    redirect: '/dashboard/index',
    name: 'Home',
    meta: {
      title: '首页',
      icon: 'ep:key',
      auth: '/dashboard',
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/dashboard/index.vue'),
        name: 'HomeIndex',
        meta: {
          title: '首页',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/home',
          auth: '/dashboard',
        },
      },
    ],
  },
  ...baseRoutes,
  ...dataRoutes,
  ...sysRoutes,
]

export default routes
