import{makeStyles as t,Typography as e}from"@material-ui/core";import{isNativeDetected as n}from"../../../utils/mobileDetect.js";import{formatMentionText as o}from"../../UserMention/utils/index.js";import i from"../../Attachment/index.js";import{convertValue as a,getUnitDisplay as r}from"../../../utils/convert.js";import{FEED_ITEM_TYPES as l}from"../../../constants/feed.js";import{jsxs as c,jsx as m,Fragment as d}from"react/jsx-runtime";var s=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"}}}})),f=function(t){var f=t.feedItem,h=f.context[l.TRACES_MEMO],p=h.body,u=h.attachment,v=void 0===u?{}:u,g=h.bitDepth,x=h.holeDepth,N=f.mentioned_users,j=s(),D=a(+x,"length","ft"),y=a(+x,"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 c("div",{className:j.wrapper,children:[(x||0===x)&&c(e,{className:j.infoField,children:["Hole Depth:"," ",m("span",{children:"".concat(Math.round(D).toLocaleString()," ").concat(r("length"))})]}),(g||0===x)&&c(e,{className:j.infoField,children:["Bit Depth:"," ",m("span",{children:"".concat(Math.round(y).toLocaleString()," ").concat(r("length"))})]}),p&&c(d,{children:[m(e,{className:j.infoField,children:"Description:"}),m(e,{"data-testid":"".concat("NptLessonsCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:o(p,N,n)})]}),v&&(F||M)&&m("div",{className:j.attachment,children:m(i,{small:!0,attachmentUrl:F,fileName:M,displayName:M})})]})};export{f as default};
//# sourceMappingURL=NptLessonsCommentFeedItem.js.map
