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'
import PoliceSituation from '../views/PoliceSituation/index.vue'
import FireCondition from '../views/FireCondition/index.vue'
import Iot from '../views/Iot/index.vue'
import H5 from '../views/H5/index.vue'
import Test from '../views/Test/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: "/home",
      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,
          }
        },
        {
          path: '/police',
          name: 'police',
          component: PoliceSituation,
          meta: {
            id: 5,
          }
        },
        {
          path: '/fire-condition',
          name: 'fire-condition',
          component: FireCondition,
          meta: {
            id: 6,
          }
        },
        {
          path: '/iot',
          name: 'iot',
          component: Iot,
          meta: {
            id: 7
          }
        },
        {
          path: '/test',
          name: 'test',
          component: Test,
          meta: {}
        }
      ],
    },
    {
      path: "/h5",
      name: "h5",
      component: H5
    }
  ],
});

export default router;
