import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import emptyPage from "@/views/404.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "404",
    meta: { title: "404" },
    component: emptyPage
  },
  {
    path: "/test-share",
    name: "TestShare",
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/sport-share-link.vue")
  },
  {
    path: "/share",
    name: "Share",
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/sport-share-link.vue")
  },
  // {
  //   path: "/game_guide",
  //   name: "GuideAsss",
  //   meta: { title: "操作指引" },
  //   component: () =>
  //     import(/* webpackChunkName: "guide" */ "../views/guide.vue")
  // },
  {
    path: "/guide",
    name: "Guide",
    meta: { title: "新手指引" },
    component: () =>
      import(/* webpackChunkName: "guide" */ "../views/Guide/Index/index.vue")
  },
  {
    path: "/connect",
    name: "Connect",
    meta: { title: "连接APP" },
    component: () =>
      import(/* webpackChunkName: "guide" */ "../views/Guide/Connect/index.vue")
  },
  {
    path: "/recharge",
    name: "Recharge",
    meta: { title: "鞋子充电" },
    component: () =>
      import(
        /* webpackChunkName: "guide" */ "../views/Guide/Recharge/index.vue"
      )
  },
  {
    path: "/pair",
    name: "Pair",
    meta: { title: "配对激活" },
    component: () =>
      import(/* webpackChunkName: "guide" */ "../views/Guide/Pair/index.vue")
  },
  {
    path: "/begin",
    name: "Begin",
    meta: { title: "开始运动" },
    component: () =>
      import(/* webpackChunkName: "guide" */ "../views/Guide/Begin/index.vue")
  },
  {
    path: "/power",
    name: "Power",
    meta: { title: "查看电量" },
    component: () =>
      import(/* webpackChunkName: "guide" */ "../views/Guide/Power/index.vue")
  },
  {
    path: "/replace",
    name: "Replace",
    meta: { title: "更换设备" },
    component: () =>
      import(/* webpackChunkName: "guide" */ "../views/Guide/Replace/index.vue")
  },
  {
    path: "/miracast",
    name: "Miracast",
    meta: { title: "电视投屏" },
    component: () =>
      import(
        /* webpackChunkName: "guide" */ "../views/Guide/Miracast/index.vue"
      )
  }
];

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

export default router;
