import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@views/Home.vue'
// import StaticView from '@views/Static.vue'
// import ConcernementView from '@views/Concernement.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/static/:id',
      name: 'static',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Static.vue'),
      props: true
    },
    {
      path: '/concernement/:id/:eid?',
      name: 'concernement',
      // component: ConcernementView,
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Concernement.vue'),
      props: true
    }
  ]
})

export default router
