// export enum PageEnum {
//   // basic login path
//   BASE_LOGIN = '/login',
//   // basic home path
//   BASE_HOME = '/dashboard',
//   // error page path
//   ERROR_PAGE = '/exception',
//   // error log page path
//   ERROR_LOG_PAGE = '/error-log/list',
//   // 欢迎登陆
//   WELCOME_HOME = '/welcome',
// }
import { ResultEnum } from '@/enums/httpEnum';

export const PageWrapperFixedHeightKey = 'PageWrapperFixedHeight';

// 新增
export enum ChartEnum {
  // 图表创建
  CHART_HOME = '/chart/home/:id(.*)*',
  CHART_HOME_NAME = 'ChartHome',
}

export enum PreviewEnum {
  //  图表预览
  CHART_PREVIEW = '/chart/preview/:id(.*)*',
  CHART_PREVIEW_NAME = 'ChartPreview',
}

export enum EditEnum {
  //  图表JSON编辑
  CHART_EDIT = '/chart/edit/:id(.*)*',
  CHART_EDIT_NAME = 'ChartEdit',
}

export enum PageEnum {
  // basic login path
  BASE_LOGIN = '/login',
  // basic home path
  BASE_HOME = '/dashboard',
  // error page path
  ERROR_PAGE = '/exception',
  // error log page path
  ERROR_LOG_PAGE = '/error-log/list',
  // 欢迎登陆
  WELCOME_HOME = '/welcome',
  // 登录
  BASE_LOGIN_NAME = 'Login',

  //重定向
  REDIRECT = '/redirect',
  REDIRECT_NAME = 'Redirect',
  RELOAD = '/reload',
  RELOAD_NAME = 'Reload',

  // 首页
  // BASE_HOME = '/project',
  BASE_HOME_NAME = 'Project',

  // 我的项目
  BASE_HOME_ITEMS = '/project/items',
  BASE_HOME_ITEMS_NAME = 'Project-Items',

  // 远程组件
  BASE_HOME_REMOTE = '/project/remote',
  BASE_HOME_REMOTE_NAME = 'Project-Remote',

  BASE_HOME_LIST_REMOTE = '/project/remote/list',
  BASE_HOME_LIST_REMOTE_NAME = 'Project-Remote-List',

  BASE_HOME_CREATE_REMOTE = '/project/remote/create/:id(.*)*',
  BASE_HOME_CREATE_REMOTE_NAME = 'Project-Remote-Create',

  BASE_HOME_EDIT_REMOTE = '/project/remote/edit/:id(.*)*',
  BASE_HOME_EDIT_REMOTE_NAME = 'Project-Remote-Edit',

  // 我的模板
  BASE_HOME_TEMPLATE = '/project/my-template',
  BASE_HOME_TEMPLATE_NAME = 'Project-My-Template',

  // 模板市场
  BASE_HOME_TEMPLATE_MARKET = '/project/template-market',
  BASE_HOME_TEMPLATE_MARKET_NAME = 'Project-Template-Market',

  // 错误
  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],
]);
