import Layout from '@/layout'

const HomeRoutes = {
  path: '/',
  component: Layout,
  redirect: '/dashboard',
  children: [
    {
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index.vue'),
      //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
      meta: { title: 'Dashboard', elSvgIcon: 'Fold' }
    }
  ]
}

const DemoRoutes = {
  path: '/example',
  component: Layout,
  redirect: '/example/table',
  name: 'Example',
  meta: { title: 'Example', icon: 'example' },
  children: [
    {
      path: 'table',
      name: 'Table',
      component: () => import('@/views/table/index.vue'),
      meta: { title: 'Table', icon: 'table' }
    },
    {
      path: 'tree',
      name: 'Tree',
      component: () => import('@/views/tree/index.vue'),
      meta: { title: 'Tree', icon: 'tree' }
    },
    {
      path: 'worker-Demo',
      name: 'WorkerDemo',
      component: () => import('@/views/example/worker'),
      meta: { title: 'Worker Demo', icon: 'nested' }
    }
  ]
}

export default [HomeRoutes, DemoRoutes]
