"use strict";

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

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

var _krPushScore = _interopRequireDefault(require("./kr-push-score"));

var _score = _interopRequireDefault(require("../../../../score"));

require("../index.css");

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

function _default(props) {
  var data = props.data,
      editable = props.editable,
      evaluateValue = props.evaluateValue,
      setEvaluateValue = props.setEvaluateValue,
      isEvaluate = props.isEvaluate;

  var onScoreChangeHandler = function onScoreChangeHandler(v) {
    setEvaluateValue(v);
  };

  var score = /*#__PURE__*/_react["default"].createElement(_score["default"], {
    score: evaluateValue,
    editable: editable,
    isEvaluate: isEvaluate
  });

  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, editable ? /*#__PURE__*/_react["default"].createElement(_krPushScore["default"], {
    setRefInParent: function setRefInParent() {},
    textAreaValue: data.remark || "",
    areaValue: "",
    value: evaluateValue,
    container: window.document.body,
    noIconEdit: true,
    createTask: true,
    editable: false,
    onChangeScore: onScoreChangeHandler,
    evaluateEditable: true,
    mileStoneId: data.mileStoneId,
    showMessage: false,
    hasText: true,
    align: "bottom right",
    renderTag: function renderTag() {
      return score;
    }
  }) : score);
}