import type { RouteRecordRaw } from 'vue-router'

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

const routes: RouteRecordRaw[] = [
  {
    path: '/daas/data',
    component: Layout,
    redirect: '/daas/data/database',
    name: 'daas_data',
    meta: {
      title: '数据仓库',
      icon: 'ep:coin',
    },
    children: [
      {
        path: 'database',
        name: 'daas_data_index',
        component: () => import('@/views/daas/database/index.vue'),
        meta: {
          title: '数据仓库',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/daas/data',
        },
      },
    ],
  },
  {
    path: '/daas/data/database-access',
    component: Layout,
    redirect: '/daas/data/database-access/index',
    name: 'databaseAccess',
    meta: {
      title: '数据库接入',
      icon: 'ep:coin',
    },
    children: [
      {
        path: 'index',
        name: 'database_access',
        component: () => import('@/views/daas/database_access/index.vue'),
        meta: {
          title: '数据库接入',
          sidebar: false,
          activeMenu: '/daas/data/database-access',
        },
      },
    ],
  },
  {
    path: '/daas/data/database-type',
    component: Layout,
    redirect: '/daas/data/database-type/index',
    name: 'dataTypeList',
    meta: {
      title: '数据库类型',
      icon: 'ep:coin',
    },
    children: [
      {
        path: 'index',
        name: 'database_type',
        component: () => import('@/views/daas/database_type/index.vue'),
        meta: {
          title: '数据库类型',
          sidebar: false,
          activeMenu: '/daas/data/database-type',
        },
      },
    ],
  },
]
export default routes
