import {
  ARCHIVE_TYPE,
  ASS_INDEX_TYPE,
  DEPT_STATUS_ENUM,
  PUBLISH_ENUM,
  REVIEW_MATERIAL_TYPE,
} from "./types";

export const PUBLISH_STATUS_MAP = {
  [PUBLISH_ENUM.PENDING]: {
    label: "待发布",
    color: "#1677ff",
  },
  [PUBLISH_ENUM.PUBLISHED]: {
    label: "已发布",
    color: "#242424",
  },
  [PUBLISH_ENUM.ENDED]: {
    label: "已结束",
    color: "#909399",
  },
  [PUBLISH_ENUM.EVALUATED]: {
    label: "已评定",
    color: "#67C23A",
  },
};

/**
 * 考核单状态
 */
export const PUBLISH_STATUS_OPTIONS = [
  {
    label: "待发布",
    value: PUBLISH_ENUM.PENDING,
  },
  {
    label: "已发布",
    value: PUBLISH_ENUM.PUBLISHED,
  },
  {
    label: "已结束",
    value: PUBLISH_ENUM.ENDED,
  },
  {
    label: "已评定",
    value: PUBLISH_ENUM.EVALUATED,
  },
];

/**
 * 初始化指标
 */
export const DEFAULT_INDEX_ITEM = {
  level: "",
  name: "",
  type: "",
  num: null,
};

/**
 * 初始化加分项
 */
export const DEFAULT_BONUS_ITEM = {
  name: "",
  num: null,
};

/**
 * 考核类别
 */
export const ASSESSMENT_TYPE_OPTIONS = [
  {
    label: "定级评估",
    value: ASS_INDEX_TYPE.FIXED,
  },
  {
    label: "运行评估",
    value: ASS_INDEX_TYPE.OPERATION,
  },
];

/**
 * 填报状态
 */
export const DEPT_STATUS_MAP = {
  [DEPT_STATUS_ENUM.PENDING_SUBMIT]: {
    label: "待填报",
    color: "#1677ff",
  },
  [DEPT_STATUS_ENUM.PENDING_EXAMINE]: {
    label: "待审核",
    color: "#1677ff",
  },
  [DEPT_STATUS_ENUM.EXAMINE_REJECT]: {
    label: "审核未通过",
    color: "#F56C6C",
  },
  [DEPT_STATUS_ENUM.EXAMINE_SUCCESS]: {
    label: "审核通过",
    color: "#E6A23C",
  },
  [DEPT_STATUS_ENUM.RETURN]: {
    label: "退回",
    color: "#F56C6C",
  },
  [DEPT_STATUS_ENUM.SUCCESS]: {
    label: "评定通过",
    color: "#67C23A",
  },
};

export const DEPT_STATUS_OPTIONS = [
  {
    label: "待填报",
    value: DEPT_STATUS_ENUM.PENDING_SUBMIT,
  },
  {
    label: "待审核",
    value: DEPT_STATUS_ENUM.PENDING_EXAMINE,
  },
  {
    label: "审核未通过",
    value: DEPT_STATUS_ENUM.EXAMINE_REJECT,
  },
  {
    label: "审核通过",
    value: DEPT_STATUS_ENUM.EXAMINE_SUCCESS,
  },
  {
    label: "退回",
    value: DEPT_STATUS_ENUM.RETURN,
  },
  {
    label: "评定通过",
    value: DEPT_STATUS_ENUM.SUCCESS,
  },
];

export const REVIEW_MATERIAL_STATUS_MAP = {
  [REVIEW_MATERIAL_TYPE.PENDING]: "待审核",
  [REVIEW_MATERIAL_TYPE.PASS]: "合格",
  [REVIEW_MATERIAL_TYPE.FAIL]: "不合格",
};

export const ARCHIVE_TYPE_MAP = {
  [ARCHIVE_TYPE.ARCHIVED]: "已归档",
  [ARCHIVE_TYPE.UNARCHIVED]: "未归档",
};
