Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/page_editor/plugins/comments/components/ReplyCommentForm",["module","exports","require","@frontend-taglib-clay$clayui/button","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../app/contexts/StoreContext","../../../app/thunks/addFragmentComment","./CommentForm"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({disabled:e,fragmentEntryLinkId:t,parentCommentId:n}){const[i,c]=(0,o.useState)(!1),[f,p]=(0,o.useState)(!1),[s,y]=(0,o.useState)(""),m=(0,u.useDispatch)();return o.default.createElement("div",{className:"mr-3 pb-2"},f?o.default.createElement(d.default,{autoFocus:!0,id:"pageEditorCommentReplyEditor_".concat(n),loading:i,onCancelButtonClick:()=>{p(!1),y("")},onSubmitButtonClick:()=>{c(!0),m((0,l.default)({body:s,fragmentEntryLinkId:t,parentCommentId:n})).then((()=>{c(!1),p(!1),y("")})).catch((()=>{(0,a.openToast)({message:Liferay.Language.get("the-reply-could-not-be-saved"),type:"danger"}),c(!1)}))},onTextareaChange:e=>e&&y(e),showButtons:!0,submitButtonLabel:Liferay.Language.get("reply"),textareaContent:s}):o.default.createElement(r.default,{borderless:!0,disabled:e,displayType:"secondary",onClick:()=>p(!0),small:!0},Liferay.Language.get("reply")))};var r=c(n("@frontend-taglib-clay$clayui/button")),a=n("frontend-js-web"),o=(c(n("liferay!frontend-js-react-web$prop-types")),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 n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react"))),u=n("../../../app/contexts/StoreContext"),l=c(n("../../../app/thunks/addFragmentComment")),d=c(n("./CommentForm"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=ReplyCommentForm.js.map