Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.169/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({label:e=Liferay.Language.get("page"),mappedLayout:t,onLayoutSelect:r}){const i=(0,o.useMemo)((()=>{if(null==t?void 0:t.layoutUuid){const e=new URL(n.config.layoutItemSelectorURL);return e.searchParams.set("".concat((0,a.getPortletNamespace)(Liferay.PortletKeys.ITEM_SELECTOR),"layoutUuid"),t.layoutUuid),e.toString()}return n.config.layoutItemSelectorURL}),[t]);return o.default.createElement("div",{className:"mb-3"},o.default.createElement(u.default,{eventName:"".concat(n.config.portletNamespace,"selectLayout"),itemSelectorURL:i,label:e,onItemSelect:e=>r(e),selectedItem:t,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