import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/discover",
    name: "discover 🧭",
    component: () => import("../views/DiscoverView.vue"),
  },
  {
    path: "/visit/:id",
    name: "visiting 👽",
    component: () => import("../views/StarView.vue"),
  },
  {
    path: "/",
    name: "starchart 🗺️",
    component: () => import("../views/ChartView.vue"),
  },
  {
    path: "/:pathMatch(.*)*",
    name: "error 404 😓",
    component: () => import("../views/NotFoundVue.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
