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

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

    var _Layout = _interopRequireDefault(require("../Layout"));

    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
     */

    /**
     * @param {HTMLElement} fragmentElement
     * @return {Array<{editableId: string, editableValueNamespace: string, element: HTMLElement, processor: object }>}
     */
    function getAllPortals(element) {
      return Array.from(element.querySelectorAll('lfr-drop-zone')).map(function (dropZoneElement) {
        var mainItemId = dropZoneElement.getAttribute('uuid') || '';

        var Component = function Component() {
          return mainItemId ? /*#__PURE__*/_react.default.createElement(_Layout.default, {
            mainItemId: mainItemId
          }) : null;
        };

        Component.displayName = "DropZone(".concat(mainItemId, ")");
        return {
          Component: Component,
          element: dropZoneElement,
          mainItemId: mainItemId
        };
      });
    }
    //# sourceMappingURL=getAllPortals.js.map
  }
});
//# sourceMappingURL=getAllPortals.js.map