"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getProcessColor = exports.OkrRiskMapping = void 0;
// okr 进度颜色
var OkrRiskMapping = {
  0: {
    line: "linear-gradient(270deg, #2879ff, #9fbfff)",
    textColor: "#2879ff"
  },
  // 正常推进
  1: {
    line: "linear-gradient(270deg, #2879ff, #9fbfff)",
    textColor: "#2879ff"
  },
  // 正常推进
  2: {
    line: "linear-gradient(270deg, #f6bd16, #ffe18b)",
    textColor: "#f6bd16"
  },
  // 注意风险
  3: {
    line: "linear-gradient(270deg, #f05e5e, #ffa5a5)",
    textColor: "#f05e5e"
  },
  // 已有风险
  4: {
    line: "linear-gradient(270deg, #BFC7D5, #E1E5EC)",
    text: "#BFC7D5"
  },
  // 完成
  5: {
    line: "linear-gradient(270deg, #f05e5e, #ffa5a5)",
    textColor: "#f05e5e"
  },
  // 延期完成
  6: {
    line: "linear-gradient(270deg, #2879ff, #9fbfff)",
    textColor: "#2879ff"
  } // 正常推进

}; // kr 进度颜色

exports.OkrRiskMapping = OkrRiskMapping;

var getProcessColor = function getProcessColor(level, type, status) {
  var stopColor = {
    linearStartColor: "#e1e5ec",
    linearEndColor: "#bfc7d5",
    backgroundColor: "#f0f2f5"
  };

  if (status === 2) {
    return stopColor[type];
  }

  var processColor = {
    1: {
      riskLevel: 1,
      linearStartColor: "#4E90FF",
      linearEndColor: "#2879ff",
      backgroundColor: "rgba(40,121,255,0.11)"
    },
    3: {
      riskLevel: 3,
      linearStartColor: "#FFA5A5",
      linearEndColor: "#F05E5E",
      backgroundColor: "rgba(222,89,89,0.1)"
    },
    2: {
      riskLevel: 2,
      linearStartColor: "#FDCD41",
      linearEndColor: "#FFE18B",
      backgroundColor: "#FEF5DC"
    }
  };
  var color = processColor["".concat(level)];
  if (level == 0) color = processColor["1"];
  if (!color) return {};
  return color[type];
};

exports.getProcessColor = getProcessColor;