Liferay.Loader.define("@liferay/object-web@1.0.145/js/components/ModalAddObjectCustomView",["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"),i=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 i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=a?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(r,i,n):r[i]=e[i]}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,i.useState)(),{observer:o,onClose:l}=(0,a.useModal)({onClose:()=>r(!1)});return(0,i.useEffect)((()=>{const openModal=()=>r(!0);return Liferay.on("addObjectView",openModal),()=>{Liferay.detach("addObjectView",openModal)}}),[]),i.default.createElement(a.ClayModalProvider,null,t&&i.default.createElement(n.default,{apiURL:e,inputId:"listObjectCustomViewName",label:Liferay.Language.get("new-view"),observer:o,onClose:l}))};t.default=_default}}));
//# sourceMappingURL=ModalAddObjectCustomView.js.map