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