Liferay.Loader.define("portal-workflow-metrics-web@2.0.46/js/shared/components/autocomplete/AutocompleteDropDown.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/autocomplete', '@frontend-taglib-clay$clayui/drop-down', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.DropDown = void 0;

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

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

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

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

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    var DropDown = function DropDown(_ref) {
      var active = _ref.active,
          activeItem = _ref.activeItem,
          _ref$id = _ref.id,
          id = _ref$id === void 0 ? '' : _ref$id,
          items = _ref.items,
          match = _ref.match,
          onSelect = _ref.onSelect,
          setActiveItem = _ref.setActiveItem;
      return (/*#__PURE__*/_react.default.createElement(_autocomplete.default.DropDown, {
          active: active
        }, /*#__PURE__*/_react.default.createElement(_dropDown.default.ItemList, {
          id: "dropDownList".concat(id)
        }, items.length > 0 ? items.map(function (item, index) {
          return (/*#__PURE__*/_react.default.createElement(_autocomplete.default.Item, {
              className: index === activeItem ? 'active' : '',
              key: index,
              match: match,
              onMouseDown: function onMouseDown() {
                return onSelect(item);
              },
              onMouseOver: function onMouseOver() {
                return setActiveItem(index);
              },
              value: item.name
            })
          );
        }) : /*#__PURE__*/_react.default.createElement(_dropDown.default.Item, {
          className: "disabled"
        }, Liferay.Language.get('no-results-were-found'))))
      );
    };

    exports.DropDown = DropDown;
    //# sourceMappingURL=AutocompleteDropDown.es.js.map
  }
});
//# sourceMappingURL=AutocompleteDropDown.es.js.map