import Vue from "vue";
import VueRouter from "vue-router";
import BasicLayout from "@/layouts/BasicLayout.vue";
import HomePage from "../views/Home/index.vue";
import DetailPage from "../views/Detail/index.vue";
import Basic from '../views/Basic/index.vue'
import Fire from '../views/Fire/index.vue'
import Risk from '../views/Risk/index.vue'
Vue.use(VueRouter);
const router = new VueRouter({
  mode: "history",
  base: import.meta.env.BASE_URL,
  routes: [
    {
      path: "/",
      name: "basic-layout",
      component: BasicLayout,
      redirect: "/detail",
      children: [
        {
          path: "/home",
          name: "home-page",
          component: HomePage,
          meta: {
            id: 1,
          },
        },
        {
          path: "/detail",
          name: "detail-page",
          component: DetailPage,
          meta: {
            id: -1,
          },
        },
        {
          path: "/basic",
          name: "basic",
          component: Basic,
          meta: {
            id: 2,
          },
        },
        {
          path: "/fire",
          name: "fire",
          component: Fire,
          meta: {
            id: 3,
          },
        }, 
        {
          path: '/risk',
          name: 'risk',
          component: Risk,
          meta: {
            id: 4,
          }
        }
      ],
    },
  ],
});

export default router;
