Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/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({mappedLayout:e,onLayoutSelect:t}){const r=(0,a.useMemo)((()=>{if(null==e?void 0:e.layoutUuid){const t=new URL(n.config.layoutItemSelectorURL);return t.searchParams.set("".concat((0,o.getPortletNamespace)(Liferay.PortletKeys.ITEM_SELECTOR),"layoutUuid"),e.layoutUuid),t.toString()}return n.config.layoutItemSelectorURL}),[e]);return a.default.createElement("div",{className:"mb-3"},a.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 o=r("frontend-js-web"),a=(i(r("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var n=o?Object.getOwnPropertyDescriptor(e,a):null;n&&(n.get||n.set)?Object.defineProperty(r,a,n):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),n=r("../../app/config/index"),l=i(r("../../app/utils/item-selector-value/itemSelectorValueToLayout")),u=i(r("./ItemSelector"));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=LayoutSelector.js.map