import { createRouter, createWebHistory } from 'vue-router'
import StorePage from '../modules/store/StorePage.vue'
import AdminPage from '../modules/admin/AdminPage.vue'
import ProductDetail from '../modules/store/ProductDetail.vue'
import CheckoutPage from '../modules/store/CheckoutPage.vue'
import AuthCallback from '../modules/auth/AuthCallback.vue'
import MyOrdersPage from '../modules/user/MyOrdersPage.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    { path: '/', name: 'store', component: StorePage },
    { path: '/product/:id', name: 'product-detail', component: ProductDetail },
    { path: '/checkout/:id', name: 'checkout', component: CheckoutPage },
    { path: '/admin', name: 'admin', component: AdminPage },
    { path: '/auth/callback', name: 'auth-callback', component: AuthCallback },
    { path: '/my/orders', name: 'my-orders', component: MyOrdersPage }
  ]
})

export default router
