Liferay.Loader.define("layout-content-page-editor-web@2.0.75/page_editor/plugins/experience/components/ExperimentLabel", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/label', 'frontend-js-react-web$react', '../statuses', '../types'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports["default"] = void 0;

    var _label = _interopRequireDefault(require("@frontend-taglib-clay$clayui/label"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    var _statuses = require("../statuses");

    var _types = require("../types");

    var _STATUS_TO_TYPE;

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

    function _defineProperty(obj, key, value) {
      if (key in obj) {
        Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }return obj;
    }

    var STATUS_TO_TYPE = (_STATUS_TO_TYPE = {}, _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_COMPLETED, 'success'), _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_DRAFT, 'secondary'), _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_FINISHED_NO_WINNER, 'secondary'), _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_FINISHED_WINNER, 'success'), _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_PAUSED, 'warning'), _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_RUNNING, 'primary'), _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_SCHEDULED, 'warning'), _defineProperty(_STATUS_TO_TYPE, _statuses.STATUS_TERMINATED, 'danger'), _STATUS_TO_TYPE);

    var _statusToLabelDisplayType = function _statusToLabelDisplayType(status) {
      return STATUS_TO_TYPE[status];
    };
    /**
     * This component simlpy maps a `value` to an associated `displayType` for Experiment statuses
     */

    var ExperimentLabel = function ExperimentLabel(_ref) {
      var label = _ref.label,
          value = _ref.value;

      var displayType = _statusToLabelDisplayType(value);

      return _react["default"].createElement(_label["default"], {
        displayType: displayType
      }, label);
    };

    var _default = ExperimentLabel;
    exports["default"] = _default;
    //# sourceMappingURL=ExperimentLabel.js.map
  }
});
//# sourceMappingURL=ExperimentLabel.js.map