import { createRouter, createWebHistory } from "vue-router";
import HomePage from "./pages/HomePage.vue";
import AboutPage from "./pages/AboutPage.vue";
import SampleListPage from "./pages/SampleListPage.vue";
import SampleDetailPage from "./pages/SampleDetailPage.vue";
import SampleFormPage from "./pages/SampleFormPage.vue";

const routes = [
  { path: "/", name: "Home", component: HomePage },
  { path: "/about", name: "About", component: AboutPage },
  { path: "/samples", name: "Samples", component: SampleListPage },
  { path: "/samples/new", name: "SampleNew", component: SampleFormPage },
  { path: "/samples/:id", name: "SampleDetail", component: SampleDetailPage },
  { path: "/samples/:id/edit", name: "SampleEdit", component: SampleFormPage },
];

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

export default router;
