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

const routes: RouteRecordRaw[] = [
  {
    path: "/",
    redirect: "/status",
  },
  {
    path: "/status",
    name: "status",
    component: () => import("@/views/Status.vue"),
    meta: { title: "Status" },
  },
  {
    path: "/peers",
    name: "peers",
    component: () => import("@/views/Peers.vue"),
    meta: { title: "Peers" },
  },
  {
    path: "/routes",
    name: "routes",
    component: () => import("@/views/Routes.vue"),
    meta: { title: "Routes" },
  },
  {
    path: "/messages",
    name: "messages",
    component: () => import("@/views/Messages.vue"),
    meta: { title: "Messages" },
  },
  {
    path: "/topics",
    name: "topics",
    component: () => import("@/views/Topics.vue"),
    meta: { title: "Topics" },
  },
  {
    path: "/settings",
    name: "settings",
    component: () => import("@/views/Settings.vue"),
    meta: { title: "Settings" },
  },
];

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