"use strict";var e=require("@material-ui/core"),t=require("moment"),a=require("../../../utils/index.js"),i=require("../../../utils/mobileDetect.js"),n=require("../../UserMention/utils/index.js"),r=require("../../Attachment/index.js"),s=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=c(t),l=e.makeStyles((function(e){return{text:{color:e.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:e.palette.primary.text6,"& span":{color:"#fff"}}}})),d="DvDCommentFeedItem";module.exports=function(t){var c,m=t.feedItem,p=m.context.dvd_comment,u=p.body,h=p.attachment,f=void 0===h?{}:h,x=p.data,j=x.timestamp,y=x.bitDepth,g=x.holeDepth,v=x.cost,D=m.mentioned_users,N=l(),b=a.convertValue(+y,"length","ft"),F=a.convertValue(+g,"length","ft"),T=a.getUnitDisplay("length");return s.jsxs("div",{className:N.wrapper,children:[u&&s.jsx(e.Typography,{"data-testid":"".concat(d,"_message"),variant:"body1",gutterBottom:!0,children:n.formatMentionText(u,D,i.isNativeDetected)}),j&&s.jsxs(e.Typography,{className:N.infoField,children:["Time:"," ",s.jsx("span",{"data-testid":"".concat(d,"_time"),children:o.default.unix(j).format("MM.DD.YYYY, HH:mm")})]}),Number.isFinite(F)&&s.jsxs(e.Typography,{className:N.infoField,children:["Hole Depth: ",s.jsx("span",{"data-testid":"".concat(d,"_holeDepth"),children:"".concat(F," ").concat(T)})]}),Number.isFinite(b)&&s.jsxs(e.Typography,{className:N.infoField,children:["Bit Depth: ",s.jsx("span",{"data-testid":"".concat(d,"_bitDepth"),children:"".concat(b," ").concat(T)})]}),v&&Number.isFinite(v)&&s.jsxs(e.Typography,{className:N.infoField,children:["Cost: ",s.jsxs("span",{"data-testid":"".concat(d,"_cost"),children:[(c=v,c.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "))," $"]})]}),f&&f.url&&s.jsx("div",{className:N.attachment,children:s.jsx(r,{small:!0,attachmentUrl:f.url,fileName:f.name,displayName:f.name})})]})};
