import {
  createWebHistory,
  createWebHashHistory,
  createMemoryHistory,
  createRouter,
} from "vue-router";
import Login from "../views/index/Login.vue";
import VoyageList from "../views/voyage/voyageList.vue";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      name: "index",
      component: () => import("../views/index/Index.vue"),
    },
    {
      path: "/login",
      name: "login",
      meta: {
        title: "登录",
      },
      component: Login,
    },
    {
      path: "/cargoOwnerManage/cargoOwnerCompanyDetail",
      name: "cargoOwnerCompanyDetail",
      meta: {
        title: "货主详情",
      },
      component: () =>
        import("../views/cargoOwnerManage/cargoOwnerCompanyDetail.vue"),
    },
    {
      path: "/cargoOwnerManage/cargoOwnerCompanyList",
      name: "cargoOwnerCompanyList",
      meta: {
        title: "货主列表",
      },
      component: () =>
        import("../views/cargoOwnerManage/cargoOwnerCompanyList.vue"),
    },
    {
      path: "/shipManage/shipList",
      name: "shipList",
      meta: {
        title: "船舶列表",
      },
      component: () => import("../views/shipManage/shipList.vue"),
    },
    {
      path: "/shipManage/shipDetail",
      name: "shipDetail",
      meta: {
        title: "船舶详情",
      },
      component: () => import("../views/shipManage/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: "/shippingManage/shippingCompanyList",
      name: "shippingCompanyList",
      meta: {
        title: "船务公司列表",
      },
      component: () =>
        import("../views/shippingManage/shippingCompanyList.vue"),
    },

    {
      path: "/shippingManage/shippingCompanyDetail",
      name: "shippingCompanyDetail",
      meta: {
        title: "船务公司详情",
      },
      component: () =>
        import("../views/shippingManage/shippingCompanyDetail.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: VoyageList,
    },
    {
      path: "/agencyList",
      name: "agencyList",
      meta: {
        title: "代理列表",
      },
      component: () => import("../views/index/AgencyList.vue"),
    },
    {
      path: "/agencySubAccountList",
      name: "agencySubAccountList",
      meta: {
        title: "代理子账户列表",
      },
      component: () => import("../views/index/AgencySubAccountList.vue"),
    },
    {
      path: "/agencyManage/agencyCompanyList",
      name: "agencyCompanyList",
      meta: {
        title: "代理公司列表",
      },
      component: () => import("../views/agencyManage/agencyCompanyList.vue"),
    },
    {
      path: "/agencyManage/agencyExamine",
      name: "agencyExamine",
      meta: {
        title: "代理公司审核",
      },
      component: () => import("../views/agencyManage/agencyExamine.vue"),
    },
    {
      path: "/agencyManage/agencyCompanyDetail",
      name: "agencyCompanyDetail",
      meta: {
        title: "代理公司详情",
      },
      component: () => import("../views/agencyManage/agencyCompanyDetail.vue"),
    },
    {
      path: "/portsManage/portsList",
      name: "portsList",
      meta: {
        title: "港口列表",
      },
      component: () => import("../views/portsManage/portsList.vue"),
    },
    {
      path: "/portsManage/sailingSchedule",
      name: "sailingSchedule",
      meta: {
        title: "航期维护",
      },
      component: () => import("../views/portsManage/sailingSchedule.vue"),
    },
    {
      path: "/toolManage/blockChain",
      name: "blockChain",
      meta: {
        title: "汇很多科技区块链",
      },
      component: () => import("../views/toolManage/blockChain.vue"),
    },
    {
      path: "/toolManage/versions",
      name: "versions",
      meta: {
        title: "版本日志管理",
      },
      component: () => import("../views/toolManage/versions.vue"),
    },
    {
      path: "/toolManage/uploadFileManage",
      name: "uploadFileManage",
      meta: {
        title: "通用文件上传",
      },
      component: () => import("../views/toolManage/uploadFileManage.vue"),
    },

    {
      path: "/urls",
      name: "urls",
      meta: {
        title: "项目入口",
      },
      component: () => import("../views/toolManage/urls.vue"),
    },
  ],
});

export default router;
