import type { RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'
import { ModuleKey } from '@/enums/ModuleEnum'

/**
 * 首页 dashboard 模块路由
 * 真正的首页 dashboard 在 Stage 5 实现，这里先用现有 views/index.vue 占位
 */
const homeRoutes: RouteRecordRaw[] = [
    {
        path: '/home',
        component: Layout,
        redirect: '/home/dashboard',
        meta: { module: ModuleKey.HOME, title: '首页', icon: 'dashboard' },
        children: [
            {
                path: 'dashboard',
                name: 'HomeDashboard',
                component: () => import('@/views/index.vue'),
                meta: { module: ModuleKey.HOME, title: '首页', icon: 'dashboard', affix: true },
            },
        ],
    },
]

export default homeRoutes
