import { RouteRecordRaw } from 'vue-router'
export const Layout = () => import('@/layouts/index.vue')

const routes: Array<RouteRecordRaw> = [
  { path: '/:pathMatch(.*)*', component: () => import('@/views/error/404.vue') },
  { path: '/home', name: '总览', component: () => import('@/views/home/index.vue') },
  {
    path: '',
    component: Layout,
    meta: {},
    children: [
      {
        path: '/demo',
        name: 'Demo',
        meta: { hidden: false, title: '测试用例' },
        component: () => import('@/views/demo/index.vue')
      },
      {
        path: '/case',
        name: 'TestCase',
        meta: { hidden: false, title: '测试用例' },
        component: () => import('@/views/test/index.vue')
      },
      {
        path: '/case-list',
        name: 'TestCaseList',
        meta: { hidden: false, title: '测试用例' },
        component: () => import('@/views/test/list.vue')
      },
      {
        path: '/mx-graph',
        name: 'MxGraph',
        meta: { hidden: false, title: '流程图画布' },
        component: () => import('@/views/test/mxgraph.vue')
      }
    ]
  }
]

export default routes
