import { createRouter, createWebHistory } from 'vue-router'
import IndexView from '../views/IndexView.vue'
import LobbyView from '@/views/LobbyView.vue'
import JoinView from '@/views/JoinView.vue'
import GameView from '@/views/GameView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'index',
      component: IndexView
    },
    {
      path: '/lobby/:gameId',
      name: 'lobby',
      component: LobbyView
    },
    {
      path: '/join/:gameId',
      name: 'join',
      component: JoinView
    },
    {
      path: '/game/:gameId',
      name: 'game',
      component: GameView
    }
  ]
})

export default router
