import { INDEX_ROUTER, LOGIN_ROUTER, USER_CENTER } from "@/config/constant";
import type { RouteRecordRaw } from "vue-router";
export const constantRoutes: RouteRecordRaw[] = [
  {
    path: "/layout",
    name: "layout",
    redirect: "/index",
    component: () => import("@/components/layout/src/Layout.vue"),
    children: [
      {
        ...INDEX_ROUTER,
        component: () => import("@/views/index.vue"),
      },
      {
        ...USER_CENTER,
        component: () => import("@/views/userCenter/index.vue"),
      },
    ],
  },
  {
    path: "/",
    redirect: "/index",
  },
  {
    ...LOGIN_ROUTER,
    component: () => import("@/views/login/login.vue"),
  },
  // {
  //   path: "/test",
  //   name: "test",
  //   component: () => import("@/views/test/index.vue"),
  // },
];

export const errorRouter = [
  {
    path: "/:pathMatch(.*)*",
    component: () => import("@/components/errorMessage/404.vue"),
  },
];
