import { createRouter, createWebHistory } from "vue-router";
import InstructionView from "../views/InstructionView.vue";
import AppView from "../views/AppView.vue";
import RulesView from "../views/RulesView.vue";
import LogSourceView from "../views/LogSourceView.vue";
import NotFound from "../components/NotFound.vue";

//routing a URLs

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: "/", component: AppView }, //default link redirects to /app
    { path: "/app", component: AppView }, //redirecting URLs to its View.vue file templates
    { path: "/navod", component: InstructionView }, //redirecting URLs to its View.vue file templates
    { path: "/les", component: LogSourceView }, //redirecting URLs to its View.vue file templates
    { path: "/rules", component: RulesView }, //redirecting URLs to its View.vue file templates
    { path: "/:pathMatch(.*)", component: NotFound }, //redirecting URLs to its View.vue file templates
  ],
});

export default router;
