import {
  createWebHistory,
  createWebHashHistory,
  createMemoryHistory,
  createRouter,
} from "vue-router";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      name: "index",
      component: () => import("../views/index/Index.vue"),
    },
    {
      path: "/login",
      name: "login",
      meta: {
        title: "登录",
      },
      component: () => import("../views/index/Login.vue"),
    },
    {
      path: "/cargoOwnerManage/cargoOwnerAdd",
      name: "cargoOwnerAdd",
      meta: {
        title: "添加货主",
      },
      component: () => import("../views/cargoOwnerManage/cargoOwnerAdd.vue"),
    },
    {
      path: "/cargoOwnerManage/cargoOwnerDetail",
      name: "cargoOwnerDetail",
      meta: {
        title: "货主详情",
      },
      component: () => import("../views/cargoOwnerManage/cargoOwnerDetail.vue"),
    },
    {
      path: "/cargoOwnerManage/cargoOwnerList",
      name: "cargoOwnerList",
      meta: {
        title: "货主列表",
      },
      component: () => import("../views/cargoOwnerManage/cargoOwnerList.vue"),
    },
    {
      path: "/shipInfo/shipList",
      name: "shipList",
      meta: {
        title: "船舶列表",
      },
      component: () => import("../views/shipInfo/shipList.vue"),
    },
    {
      path: "/shipInfo/shipDetail",
      name: "shipDetail",
      meta: {
        title: "船舶详情",
      },
      component: () => import("../views/shipInfo/shipDetail.vue"),
    },
    {
      path: "/shipOwnerManage/shipOwnerDetail",
      name: "shipOwnerDetail",
      meta: {
        title: "船东详情",
      },
      component: () => import("../views/shipOwnerManage/shipOwnerDetail.vue"),
    },
    {
      path: "/shipOwnerManage/shipOwnerList",
      name: "shipOwnerList",
      meta: {
        title: "船东列表",
      },
      component: () => import("../views/shipOwnerManage/shipOwnerList.vue"),
    },

    {
      path: "/voyage/voyageAdd",
      name: "voyageAdd",
      meta: {
        title: "添加航次",
      },
      component: () => import("../views/voyage/voyageAdd.vue"),
    },

    {
      path: "/voyage/voyageDetail",
      name: "voyageDetail",
      meta: {
        title: "航次详情",
      },
      component: () => import("../views/voyage/voyageDetail.vue"),
    },

    {
      path: "/voyage/voyageList",
      name: "voyageList",
      meta: {
        title: "航次列表",
      },
      component: () => import("../views/voyage/voyageList.vue"),
    },

    {
      path: "/index/mediaCheck",
      name: "mediaCheck",
      meta: {
        title: "鉴图/视频",
      },
      component: () => import("../views/index/mediaCheck.vue"),
    },
    {
      path: "/test/test",
      name: "test",
      meta: {
        title: "test",
      },
      component: () => import("../views/test/test.vue"),
    },
  ],
});

export default router;
