import type { RouteRecordRaw } from 'vue-router'

const Layout = () => import('@/layouts/index.vue')

const routes: RouteRecordRaw[] = [
  {
    path: '/database/data',
    component: Layout,
    redirect: '/database/data/database',
    name: 'database_data',
    meta: {
      title: '数据仓库',
      icon: 'ep:coin',
    },
    children: [
      {
        path: 'database',
        name: 'database_data_index',
        component: () => import('@/views/database/data/index.vue'),
        meta: {
          title: '数据仓库',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/database/data',
        },
      },
    ],
  },
  {
    path: '/database/access',
    component: Layout,
    redirect: '/database/access/index',
    name: 'database_access',
    meta: {
      title: '数据库接入',
      icon: 'ep:link',
    },
    children: [
      {
        path: 'index',
        name: 'database_access',
        component: () => import('@/views/database/access/index.vue'),
        meta: {
          title: '数据库接入',
          sidebar: false,
          activeMenu: '/database/access',
        },
      },
    ],
  },
]
export default routes
