import { createRouter, createWebHistory } from 'vue-router'
import adminRouter from './admin'
import merchantRouter from './merchant'
import userRouter from './user'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/admin',
      children: [...adminRouter.options.routes],
    },
    {
      path: '/merchant',
      children: [...merchantRouter.options.routes],
    },
    {
      path: '/user',
      children: [...userRouter.options.routes],
    },
  ],
})

export default router
