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