import { createRouter, createWebHistory } from 'vue-router';
import HomePage from '../views/Home.vue';
import LoginPage from '../views/Login.vue';
import AnimePage from '../views/Anime.vue';
import NotFound from '../views/Error404.vue';
import UserControlPage from '@/views/UserPanel.vue';

const routes = [
  {
    path: '/',
    name: 'Home',
    component: HomePage,
  },
  {
    path: '/login',
    name: 'Login',
    component: LoginPage,
  },
  {
    path: '/anime',
    name: 'Anime',
    component: AnimePage,
  },
  {
    path: '/control-panel',
    name: 'Control Panel',
    component: UserControlPage,
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: NotFound,
  },
];

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

export default router;