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

import FrontLayout from '@/views/admin/FrontLayout.vue'
import Home from '@/views/admin/Home.vue'
import MerchantManagement from '@/views/admin/MerchantManagement.vue'
import DishManagement from '@/views/admin/DishManagement.vue'
import BranchManagement from '@/views/admin/BranchManagement.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/admin',
      component: FrontLayout,
      children: [
        { path: '', name: 'Home', component: Home },
        { path: 'merchantmanagement', name: 'merchantmanagement', component: MerchantManagement },
        { path: 'dishmanagement', name: 'dishmanagement', component: DishManagement },
        { path: 'branchmanagement', name: 'branchmanagement', component: BranchManagement },
      ],
    },
  ],
})

export default router
