Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.179/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,a.useMemo)((()=>{if(null==t?void 0:t.layoutUuid){const e=new URL(n.config.layoutItemSelectorURL);return e.searchParams.set("".concat((0,o.getPortletNamespace)(Liferay.PortletKeys.ITEM_SELECTOR),"layoutUuid"),t.layoutUuid),e.toString()}return n.config.layoutItemSelectorURL}),[t]);return a.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 o=r("frontend-js-web"),a=(_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={},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=_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