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

import GamesView from '../views/GamesView.vue'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
import OfficeView from '../views/OfficeView.vue'
import PrivacyPolicyView from '../views/PrivacyPolicyView.vue'
import ScenariosEditorView from '../views/ScenariosEditorView.vue'
import ScenariosView from '../views/ScenariosView.vue'
import UserAgreementView from '../views/UserAgreementView.vue'
import UsersView from '../views/UsersView.vue'
import CatalogView from '../views/CatalogView.vue'
import ScenarioView from '../views/ScenarioView.vue'
import GameView from '../views/GameView.vue'
import TeamStoryView from '../views/TeamStoryView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView,
    },
    {
      path: '/office',
      name: 'office',
      component: OfficeView,
    },
    {
      path: '/user-agreement',
      name: 'user-agreement',
      component: UserAgreementView,
    },
    {
      path: '/privacy-policy',
      name: 'privacy-policy',
      component: PrivacyPolicyView,
    },
    {
      path: '/games',
      name: 'games',
      component: GamesView,
    },
    {
      path: '/games/:id',
      name: 'game',
      component: GameView,
    },
    {
      path: '/team-story/:id',
      name: 'team-story',
      component: TeamStoryView,
    },
    {
      path: '/scenarios',
      name: 'scenarios',
      component: ScenariosView,
    },
    {
      path: '/catalog',
      name: 'catalog',
      component: CatalogView,
    },
    {
      path: '/scenarios/:id/editor', // Динамический параметр id
      name: 'scenario-editor',
      component: ScenariosEditorView,
    },
    {
      path: '/scenarios/:id', // Динамический параметр id
      name: 'scenario',
      component: ScenarioView,
    },
    {
      path: '/users',
      name: 'users',
      component: UsersView,
    },
  ],
})

export default router
