import { createRouter, createWebHashHistory } from "vue-router";
import ChildrenRoutes from "./ChildrenRouters";

let mainRouterChildren = [];

mainRouterChildren = mainRouterChildren.concat(ChildrenRoutes)

const routers = [
  {
    path: '/',
    name: 'MainLayout',
    redirect: '/home',
    component: () => import('../views/MainLayout.vue'),
    children: mainRouterChildren
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login/Login.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes: routers
})

export default router
