Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/plugins/comments/components/EditCommentForm",["module","exports","require","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../app/contexts/StoreContext","../../../app/thunks/editFragmentComment","./CommentForm"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({comment:e,fragmentEntryLinkId:t,onCloseForm:n}){const[c,d]=(0,r.useState)(!1),[f,m]=(0,r.useState)(e.body),p=(0,a.useDispatch)();return r.default.createElement(i.default,{autoFocus:!0,id:"pageEditorCommentEditor_".concat(e.commentId),loading:c,onCancelButtonClick:()=>n(),onSubmitButtonClick:()=>{d(!0),p((0,u.default)({body:f,commentId:e.commentId,fragmentEntryLinkId:t,parentCommentId:e.parentCommentId})).then((()=>{d(!1),n()})).catch((()=>{(0,o.openToast)({message:Liferay.Language.get("the-comment-could-not-be-edited"),type:"danger"}),d(!1)}))},onTextareaChange:e=>m(e),showButtons:!0,submitButtonLabel:Liferay.Language.get("update"),textareaContent:f})};var o=n("frontend-js-web"),r=(d(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=c();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var a=o?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react"))),a=n("../../../app/contexts/StoreContext"),u=d(n("../../../app/thunks/editFragmentComment")),i=d(n("./CommentForm"));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=EditCommentForm.js.map