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