
import { createRouter, createWebHistory } from 'vue-router'

const routes=[
  {
    path: '/',
    redirect: '/reportdtl'
  },
  {
    path: "/reportdtl",
    name: "reportDetail",
    component: () => import("@/views/report/reportDetail.vue"),
  },
  {
    path: "/reportEn",
    name: "reportEn",
    component: () => import("@/views/reportEn/detail.vue"),
  },
  {
    path: "/reportshare_crm_report",
    name: "reportDetailV1",
    component: () => import("@/views/report/reportDetail.vue"),
  },
  {
    path: "/reportshare_crm_report_en",
    name: "reportEnV1",
    component: () => import("@/views/reportEn/detail.vue"),
  },
  {
    path: "/reportshare_smart_report",
    name: "smartReport",
    component: () => import("@/views/smartReport/detail.vue"),
  },
  {
    path: "/smart_report_getImg",
    name: "smartReportGetImg",
    component: () => import("@/views/smartReport/getReportImg.vue"),
  },
  {
    path: "/reportshare_pdf",
    name: "reportDetailPdf",
    component: () => import("@/views/report/reportDetailPdf.vue"),
  },
  {
    path: "/reportshare_pdf_en",
    name: "detailPdfEn",
    component: () => import("@/views/reportEn/detailPdf.vue"),
  },
  {
    path: "/reportshare_smart_pdf",
    name: "detailSmartPdf",
    component: () => import("@/views/smartReport/detailPdf.vue"),
  },
  {
    path: "/reportshare_external",
    name: "reportshareExternal",
    component: () => import("@/views/report/reportExternalDetail.vue"),
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_APP_BASE_URL),
  routes,
});

router.beforeEach((to, from, next) => {
  next();
});

export default router;
