Liferay.Loader.define("layout-content-page-editor-web@2.0.166/page_editor/common/components/CollectionSelector", ['module', 'exports', 'require', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react', '../../app/config/index', './ItemSelector'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = CollectionSelector;

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

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

    var _index = require("../../app/config/index");

    var _ItemSelector = _interopRequireDefault(require("./ItemSelector"));

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

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    function CollectionSelector(_ref) {
      var _config$selectedMappi, _config$selectedMappi2;

      var collectionTitle = _ref.collectionTitle,
          itemSelectorURL = _ref.itemSelectorURL,
          label = _ref.label,
          onCollectionSelect = _ref.onCollectionSelect;
      var eventName = "".concat(_index.config.portletNamespace, "selectInfoList");
      return (/*#__PURE__*/_react.default.createElement(_ItemSelector.default, {
          eventName: eventName,
          itemSelectorURL: itemSelectorURL || _index.config.infoListSelectorURL,
          label: label,
          onItemSelect: onCollectionSelect,
          quickMappedInfoItems: (_config$selectedMappi = _index.config.selectedMappingTypes) === null || _config$selectedMappi === void 0 ? void 0 : _config$selectedMappi.linkedCollection,
          selectedItemTitle: collectionTitle,
          showMappedItems: !!((_config$selectedMappi2 = _index.config.selectedMappingTypes) === null || _config$selectedMappi2 === void 0 ? void 0 : _config$selectedMappi2.linkedCollection)
        })
      );
    }
    //# sourceMappingURL=CollectionSelector.js.map
  }
});
//# sourceMappingURL=CollectionSelector.js.map