import e from"prop-types";import{makeStyles as t,Typography as r}from"@material-ui/core";import{isNativeDetected as i}from"../../../utils/mobileDetect.js";import s from"../../Attachment/index.js";import{formatMentionText as a}from"../../UserMention/utils/index.js";import o from"../../CollapsibleContent.js";import{jsxs as m,jsx as n}from"react/jsx-runtime";var p=t({wrapper:{whiteSpace:"pre-wrap"}}),d=function(e){var t=e.feedItem,d=t.context.post,l=d.body,u=d.attachment,c=t.mentioned_users,f=p(),h=(null==u?void 0:u.signed_url)||(null==u?void 0:u.url)||(null==u?void 0:u.file_name);return m("div",{className:f.wrapper,children:[l&&n(o,{children:n(r,{"data-testid":"".concat("PostFeedItem","_message"),variant:"body1",gutterBottom:!0,children:a(l,c,i)})}),h&&n(s,{attachmentUrl:u.signed_url||u.url,fileName:u.file_name,attachmentSize:u.size,size:"medium"})]})};d.propTypes={feedItem:e.shape({context:e.shape({post:e.shape({body:e.string.isRequired,attachment:e.shape({url:e.string,size:e.number})}).isRequired}).isRequired,mentioned_users:e.arrayOf(e.shape({}))}).isRequired};export{d as default};
//# sourceMappingURL=PostFeedItem.js.map
