"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getDynamicTitleProps = exports["default"] = void 0;

var _constant = require("../../constant");

var _getLocale = require("../../../../utils/getLocale");

var getDynamicTitleProps = function getDynamicTitleProps(obj) {
  if (!obj) {
    return {
      type: "",
      typeBgColor: "#ffffff",
      titleBgColor: "#ffffff",
      contentColor: ""
    };
  }

  var objType = obj.objType;

  if (objType === _constant.EObjType.Kr) {
    return {
      type: "KR",
      typeBgColor: "rgba(90, 216, 166, 0.5)",
      titleBgColor: "rgba(90, 216, 166, 0.1)",
      contentColor: "#5AD8A6"
    };
  }

  if (objType === _constant.EObjType.O) {
    return {
      type: (0, _getLocale.getLocale)("Mod_Objective"),
      typeBgColor: "rgba(40, 121, 255, 0.5)",
      titleBgColor: "rgba(40, 121, 255, 0.1)",
      contentColor: "#2879FF"
    };
  }

  if (objType === _constant.EObjType.Task) {
    return {
      type: (0, _getLocale.getLocale)("Mod_Tasks"),
      typeBgColor: "rgba(92, 142, 255, 0.5)",
      titleBgColor: "rgba(92, 142, 255, 0.1)",
      contentColor: "#5C8EFF"
    };
  }

  if (objType === _constant.EObjType.Project) {
    return {
      type: (0, _getLocale.getLocale)("Mod_Project"),
      typeBgColor: "rgba(98, 77, 255, 0.5)",
      titleBgColor: "rgba(98, 77, 255, 0.1)",
      contentColor: "#624DFF"
    };
  }

  return {
    type: "",
    typeBgColor: "#ffffff",
    titleBgColor: "#ffffff",
    contentColor: ""
  };
};

exports.getDynamicTitleProps = getDynamicTitleProps;
var _default = {
  getDynamicTitleProps: getDynamicTitleProps
};
exports["default"] = _default;