Liferay.Loader.define("frontend-taglib@5.6.15/diff_version_comparator/components/List", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/alert', '@frontend-taglib-clay$clayui/list', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = List;

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

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

    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.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    function List(_ref) {
      var onChange = _ref.onChange,
          selected = _ref.selected,
          versions = _ref.versions;
      return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, versions.length ? /*#__PURE__*/_react.default.createElement(_list.default, null, versions.map(function (version) {
          return (/*#__PURE__*/_react.default.createElement(_list.default.Item, {
              active: selected && selected.version === version.version,
              className: "version-item",
              "data-version": version.version,
              flex: true,
              key: version.version,
              onClick: onChange
            }, /*#__PURE__*/_react.default.createElement(_list.default.ItemField, null, /*#__PURE__*/_react.default.createElement("div", {
              className: "user-icon user-icon-color-1 user-icon-default"
            }, /*#__PURE__*/_react.default.createElement("span", null, version.userInitials))), /*#__PURE__*/_react.default.createElement(_list.default.ItemField, {
              expand: true
            }, /*#__PURE__*/_react.default.createElement(_list.default.ItemText, null, version.displayDate), /*#__PURE__*/_react.default.createElement(_list.default.ItemTitle, null, version.label), /*#__PURE__*/_react.default.createElement(_list.default.ItemText, null, version.userName)))
          );
        })) : null, !versions.length && /*#__PURE__*/_react.default.createElement(_alert.default, {
          displayType: "info"
        }, Liferay.Language.get('there-are-no-results')))
      );
    }
    //# sourceMappingURL=List.js.map
  }
});
//# sourceMappingURL=List.js.map