"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _util = require("../../util");

var _utils = require("./utils");

require("./index.css");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var prefix = "titaui-dynamic-obj-status";

var DynamicObjStatus = function DynamicObjStatus(_ref) {
  var _ref$oStatus = _ref.oStatus,
      oStatus = _ref$oStatus === void 0 ? 1 : _ref$oStatus,
      _ref$riskLevel = _ref.riskLevel,
      riskLevel = _ref$riskLevel === void 0 ? 1 : _ref$riskLevel,
      extraClass = _ref.extraClass;
  return /*#__PURE__*/_react["default"].createElement("span", {
    className: (0, _classnames["default"])(extraClass, prefix),
    style: {
      color: (0, _utils.getStatusColor)((0, _util.getProgressState)(oStatus, riskLevel))
    }
  }, (0, _utils.getStatusTextMapping)((0, _util.getProgressState)(oStatus, riskLevel)));
};

var _default = DynamicObjStatus;
exports["default"] = _default;