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

const routes = [
    {
        path: '/',
        name: 'index',
        component: () => import('../layout/index.vue'),
        children: [
            {
                path: '/',
                name: '',
                component: () => import('../view/index/index.vue')
            },
            {
                path: '/delivery',
                name: 'delivery',
                component: () => import('../view/delivery/index.vue')
            },
        ]
    },
    {
        path: '/login',
        name: '/login',
        component: () => import('../view/login/index.vue')
    }
]

const router = createRouter({
    history: createWebHistory('/'),
    routes
})

export default router;