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