import { createRouter, createWebHistory } from "vue-router"

const MainLayout = () => import("@/views/MainLayout.vue")
const Dashboard = () => import("@/modules/01_dashboard/views/Dashboard.vue")

import ModuleTransfer from "@/modules/02_transfer/router.ts"
import ModuleLeave from "@/modules/03_leave/router.ts"

const router = createRouter({
	history: createWebHistory(import.meta.env.BASE_URL),
	routes: [
		{
			path: "/",
			name: "home",
			component: MainLayout,
			children: [
				{
					path: "/",
					name: "dashboard",
					component: Dashboard,
				},
				...ModuleTransfer,
				...ModuleLeave,
			],
		},
	],
})

export default router
