Liferay.Loader.define("@liferay/object-web@1.0.108/js/components/ModalAddObjectLayout",["module","exports","require","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$react","./ModalBasicWithFieldName"],(function(e,t,a){var r;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a("@frontend-taglib-clay$clayui/modal"),n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var n=r?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(a,o,n):a[o]=e[o]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),l=(r=a("./ModalBasicWithFieldName"))&&r.__esModule?r:{default:r};function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}var i=({apiURL:e})=>{const[t,a]=(0,n.useState)(!1),{observer:r,onClose:u}=(0,o.useModal)({onClose:()=>a(!1)});return(0,n.useEffect)((()=>{const e=()=>a(!0);return Liferay.on("addObjectLayout",e),()=>{Liferay.detach("addObjectLayout",e)}}),[]),n.default.createElement(o.ClayModalProvider,null,t&&n.default.createElement(l.default,{apiURL:e,inputId:"listObjectLayoutName",label:Liferay.Language.get("new-layout"),observer:r,onClose:u}))};t.default=i}}));
//# sourceMappingURL=ModalAddObjectLayout.js.map