import{makeStyles as t,Typography as e}from"@material-ui/core";import o from"moment";import{isNativeDetected as a}from"../../../utils/mobileDetect.js";import{formatMentionText as i}from"../../UserMention/utils/index.js";import r from"../../Attachment/index.js";import{convertValue as n,getUnitDisplay as l}from"../../../utils/convert.js";import{jsxs as m,jsx as c}from"react/jsx-runtime";var d=t((function(t){return{text:{color:t.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:t.palette.primary.text6,"& span":{color:"#fff"}}}})),s=function(t){var s=t.feedItem,f=s.type,p=s.context[f],u=p.body,h=p.attachment,v=void 0===h?{}:h,x=p.data,g=x.timestamp,y=x.holeDepth,N=s.mentioned_users,j=d(),D=n(+y,"length","ft"),F=(null==v?void 0:v.signed_url)||(null==v?void 0:v.url),M=(null==v?void 0:v.file_name)||(null==v?void 0:v.name);return m("div",{className:j.wrapper,children:[u&&c(e,{"data-testid":"".concat("PCCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:i(u,N,a)}),g&&m(e,{className:j.infoField,children:["Time: ",c("span",{children:o.unix(g).format("MM.DD.YYYY, HH:mm")})]}),(y||0===y)&&m(e,{className:j.infoField,children:["Hole Depth:"," ",c("span",{children:"".concat(Math.round(D).toLocaleString()," ").concat(l("length"))})]}),v&&(F||M)&&c("div",{className:j.attachment,children:c(r,{small:!0,attachmentUrl:F,fileName:M,displayName:M})})]})};export{s as default};
//# sourceMappingURL=PCCommentFeedItem.js.map
