import React from "react";
import { IRouteRule } from "../Menu/types";
import { PATH } from "./constants";

const routes: IRouteRule[] = [
  {
    component: React.lazy(() => import("./pages/UserInfo")),
    path: PATH.USERINFO,
    forceDisplay: true,
  },
  {
    component: React.lazy(() => import("./pages/UserInfo/Authentication")),
    path: PATH.AUTHENTICATION,
    forceDisplay: true,
  },
  {
    component: React.lazy(() => import("./pages/Cost")),
    path: PATH.COST_MANAGE,
    forceDisplay: true,
  },
  {
    component: React.lazy(() => import("./pages/Cost/History")),
    path: PATH.CONST_HISTORY,
    forceDisplay: true,
  },
  {
    component: React.lazy(() => import("./pages/Cost/Recharge")),
    path: PATH.CONST_RECHARGE,
    forceDisplay: true,
  },
  {
    component: React.lazy(() => import("./pages/Cost/Withdrawal")),
    path: PATH.CONST_WITHDRAWAL,
    forceDisplay: true,
  },
  {
    component: React.lazy(() => import("./pages/Invoice")),
    path: PATH.INVOICE_MANAGE,
    forceDisplay: true,
  },
  {
    component: React.lazy(() => import("./pages/Contract")),
    path: PATH.CONTRACT_MANAGE,
    forceDisplay: true,
  },
];

/** 全屏展示 */
export const fullRouters: IRouteRule[] = [
  {
    component: React.lazy(() => import("./pages/Login")),
    path: PATH.LOGIN,
    forceDisplay: true,
  },
];

export default routes;
