"use strict";

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

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

var _titaUi = require("tita-ui");

var _bsGlobal = require("../../../utils/bs-global");

var _style = require("../style");

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

require("./index.css");

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

var okrClassifyList = function okrClassifyList() {
  return [{
    value: 1,
    lable: (0, _getLocale.getLocale)("OKR_MyO_Es_Commitment")
  }, {
    value: 2,
    lable: (0, _getLocale.getLocale)("OKR_MyO_Es_Visiontype")
  }];
};

function _default(_ref) {
  var _getBSGlobal;

  var okrClassify = _ref.okrClassify,
      setOkrClassify = _ref.setOkrClassify,
      _ref$isCreateModal = _ref.isCreateModal,
      isCreateModal = _ref$isCreateModal === void 0 ? false : _ref$isCreateModal;
  var setting = (_getBSGlobal = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : _getBSGlobal.KRSetting;
  var openOkrType = setting.OkrTypeSetting;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "create-modal__sub-block",
    style: {
      flex: openOkrType ? 1 : 2
    }
  }, isCreateModal ? /*#__PURE__*/_react["default"].createElement("div", {
    className: "create-modal__sub-title"
  }, (0, _getLocale.getLocale)("OKR_MyO_Es_Category")) : /*#__PURE__*/_react["default"].createElement(_style.TitleLine, null, (0, _getLocale.getLocale)("OKR_MyO_Es_Category")), /*#__PURE__*/_react["default"].createElement(_titaUi.Select, {
    value: okrClassify,
    onChange: function onChange(v) {
      setOkrClassify(v);
    },
    placeholder: (0, _getLocale.getLocale)("Mod_Pleaseselect"),
    options: okrClassifyList()
  }));
}