import { ResultEnum } from "@/enums/httpEnum";

export enum PageEnum {
  // 登录
  BASE_LOGIN = "/login",
  BASE_LOGIN_NAME = "lOGIN",
  //重定向
  REDIRECT = "/redirect",
  REDIRECT_NAME = "Redirect",
  // 首页
  BASE_HOME = "/system/menu",
  // 错误
  ERROR_PAGE_NAME_403 = "ErrorPage403",
  ERROR_PAGE_NAME_404 = "ErrorPage404",
  // ERROR_PAGE_NAME_500 = "ErrorPage500",
}

export const ErrorPageNameMap = new Map([
  [ResultEnum.NOT_FOUND, PageEnum.ERROR_PAGE_NAME_404],
  [ResultEnum.SERVER_FORBIDDEN, PageEnum.ERROR_PAGE_NAME_403],
  // [ResultEnum.SERVER_ERROR, PageEnum.ERROR_PAGE_NAME_500],
]);
