"use strict";var e=require("prop-types"),t=require("../editModals/DvdCommentEdit/DvdCommentEdit.js"),o=require("../editModals/PCCommentEdit/PCCommentEdit.js"),n=require("../editModals/NptLessonsCommentEdit/NptLessonsCommentEdit.js"),s=require("../editModals/LessonsLearnedEdit/LessonsLearnedEdit.js"),d=require("../../../constants/feed.js"),a=require("../../../utils/main.js"),i=require("../../PostPreviewDialog/index.js"),l=require("../../TracesEditModal/TracesEditModalContainer.js"),r=require("../editModals/HookloadCommentEdit/HookloadCommentEdit.js"),u=require("react/jsx-runtime");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=m(e),f=function(e){var m,c,f,v,p,E,x,S,C,j,y,M=e.feedItem,I=e.onClose,q=e.onSave,D=e.tracesMinDateSec,T=e.tracesMaxDateSec,_=e.tracesAssetId;return"dvd_comment"===M.type?u.jsx(t,{feedItem:M,onClose:I,onSave:q}):"hookload_broomstick_comment"===M.type?u.jsx(r,{feedItem:M,onClose:I,onSave:q}):"pc_comment"===M.type?u.jsx(o,{feedItem:M,onClose:I,onSave:q}):"npt_lessons_comment"===M.type?u.jsx(n,{feedItem:M,onClose:I,onSave:q}):"lessons_learned"===M.type?u.jsx(s,{feedItem:M,onClose:I,onSave:q}):M.type===d.FEED_ITEM_TYPES.POST?u.jsx(i,{open:!0,title:"Edit",fileUrl:null===(m=M.context)||void 0===m||null===(c=m.post)||void 0===c||null===(f=c.attachment)||void 0===f?void 0:f.url,fileName:(null===(v=M.context)||void 0===v||null===(p=v.post)||void 0===p||null===(E=p.attachment)||void 0===E?void 0:E.url)&&a.default.getFileNameWithExtensionFromPath(null===(x=M.context)||void 0===x||null===(S=x.post)||void 0===S||null===(C=S.attachment)||void 0===C?void 0:C.url),handleClose:I,handleShare:function(e,t,o,n){return q({context:{post:{body:e,attachment:{test:1,file_name:n,url:t,size:o}}}})},message:null===(j=M.context)||void 0===j||null===(y=j.post)||void 0===y?void 0:y.body,okButtonText:"Save",cancelButtonText:"Discard changes",companyId:M.company_id}):M.type===d.FEED_ITEM_TYPES.TRACES_MEMO?D&&T&&_&&u.jsx(l,{feedItem:M,onSave:q,onClose:I,minDateSec:D,maxDateSec:T,assetId:_}):null};f.propTypes={feedItem:c.default.shape().isRequired,onClose:c.default.func.isRequired,onSave:c.default.func.isRequired,tracesMinDateSec:c.default.oneOfType([c.default.string,c.default.number]),tracesMaxDateSec:c.default.oneOfType([c.default.string,c.default.number]),tracesAssetId:c.default.oneOfType([c.default.string,c.default.number])},f.defaultProps={tracesMinDateSec:void 0,tracesMaxDateSec:void 0,tracesAssetId:void 0},module.exports=f;
//# sourceMappingURL=FeedItemEditModal.js.map
