Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.151/page_editor/common/components/LayoutSelector",["module","exports","require","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../app/config/index","../../app/utils/item_selector_value/itemSelectorValueToLayout","./ItemSelector"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutSelector=function LayoutSelector({mappedLayout:e,onLayoutSelect:t}){const r=(0,o.useMemo)((()=>{if(null==e?void 0:e.layoutUuid){const t=new URL(n.config.layoutItemSelectorURL);return t.searchParams.set("".concat((0,a.getPortletNamespace)(Liferay.PortletKeys.ITEM_SELECTOR),"layoutUuid"),e.layoutUuid),t.toString()}return n.config.layoutItemSelectorURL}),[e]);return o.default.createElement("div",{className:"mb-3"},o.default.createElement(u.default,{eventName:"".concat(n.config.portletNamespace,"selectLayout"),itemSelectorURL:r,label:Liferay.Language.get("page"),onItemSelect:e=>t(e),selectedItem:e,showMappedItems:!1,transformValueCallback:l.default}))};var a=r("frontend-js-web"),o=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var n=a?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(r,o,n):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),n=r("../../app/config/index"),l=_interopRequireDefault(r("../../app/utils/item_selector_value/itemSelectorValueToLayout")),u=_interopRequireDefault(r("./ItemSelector"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=LayoutSelector.js.map