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=void 0===u?{}:u,f=t.mentioned_users,h=p(),_=c.signed_url||c.url||c.file_name;return m("div",{className:h.wrapper,children:[l&&n(o,{children:n(r,{"data-testid":"".concat("PostFeedItem","_message"),variant:"body1",gutterBottom:!0,children:a(l,f,i)})}),_&&n(s,{attachmentUrl:c.signed_url||c.url,fileName:c.file_name,attachmentSize:c.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};
