"use strict";var e=require("@material-ui/core"),t=require("moment"),i=require("../../../utils/index.js"),a=require("../../../utils/mobileDetect.js"),n=require("../../UserMention/utils/index.js"),r=require("../../Attachment/index.js"),s=require("react/jsx-runtime");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(t),c=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 l,m=t.feedItem,u=m.context.dvd_comment,p=u.body,h=u.attachment,f=void 0===h?{}:h,x=u.data,j=x.timestamp,y=x.bitDepth,v=x.holeDepth,g=x.cost,D=m.mentioned_users,N=c(),b=i.convertValue(+y,"length","ft"),F=i.convertValue(+v,"length","ft"),_=i.getUnitDisplay("length"),T=(null==f?void 0:f.signed_url)||(null==f?void 0:f.url),q=(null==f?void 0:f.file_name)||(null==f?void 0:f.name);return s.jsxs("div",{className:N.wrapper,children:[p&&s.jsx(e.Typography,{"data-testid":"".concat(d,"_message"),variant:"body1",gutterBottom:!0,children:n.formatMentionText(p,D,a.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(_)})]}),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(_)})]}),g&&Number.isFinite(g)&&s.jsxs(e.Typography,{className:N.infoField,children:["Cost: ",s.jsxs("span",{"data-testid":"".concat(d,"_cost"),children:[(l=g,l.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "))," $"]})]}),f&&T&&s.jsx("div",{className:N.attachment,children:s.jsx(r,{small:!0,attachmentUrl:T,fileName:q,displayName:q})})]})};
//# sourceMappingURL=DvDCommentFeedItem.js.map
