Liferay.Loader.define("depot-web@1.0.90/dynamic_include/StagingIndicator", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/drop-down', '@frontend-taglib-clay$clayui/icon', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = _default;

    var _dropDown = require("@frontend-taglib-clay$clayui/drop-down");

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

    var _propTypes = _interopRequireDefault(require("frontend-js-react-web$prop-types"));

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

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

    function ownKeys(object, enumerableOnly) {
      var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        });keys.push.apply(keys, symbols);
      }return keys;
    }

    function _objectSpread(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {
          ownKeys(Object(source), true).forEach(function (key) {
            _defineProperty(target, key, source[key]);
          });
        } else if (Object.getOwnPropertyDescriptors) {
          Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
        } else {
          ownKeys(Object(source)).forEach(function (key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
          });
        }
      }return target;
    }

    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 Component = function Component(_ref) {
      var iconClass = _ref.iconClass,
          iconName = _ref.iconName,
          items = _ref.items,
          title = _ref.title;
      var tranformedItems = items.map(function (item) {
        if (item.action && item.action === 'publishToLive') {
          return _objectSpread(_objectSpread({}, item), {}, {
            onClick: function onClick() {
              Liferay.Util.openModal({
                title: item.label,
                url: item.publishURL
              });
            }
          });
        } else {
          return item;
        }
      });
      return (/*#__PURE__*/_react.default.createElement(_dropDown.ClayDropDownWithItems, {
          alignmentPosition: _dropDown.Align.BottomCenter,
          items: tranformedItems,
          trigger: /*#__PURE__*/_react.default.createElement("button", {
            className: "staging-indicator-button"
          }, /*#__PURE__*/_react.default.createElement(_icon.default, {
            className: iconClass,
            symbol: iconName
          }), /*#__PURE__*/_react.default.createElement("span", {
            className: "staging-indicator-title"
          }, title), /*#__PURE__*/_react.default.createElement(_icon.default, {
            symbol: "caret-bottom"
          }))
        })
      );
    };

    function _default(props) {
      return (/*#__PURE__*/_react.default.createElement(Component, props)
      );
    }
    //# sourceMappingURL=StagingIndicator.js.map
  }
});
//# sourceMappingURL=StagingIndicator.js.map