"use strict";var e=require("@material-ui/core"),t=require("moment"),a=require("../../../utils/mobileDetect.js"),r=require("../../UserMention/utils/index.js"),i=require("../../Attachment/index.js"),n=require("../../../utils/convert.js"),l=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(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"}}}}));module.exports=function(t){var o=t.feedItem,m=o.type,d=o.context[m],u=d.body,p=d.attachment,h=void 0===p?{}:p,f=d.data,x=f.timestamp,y=f.holeDepth,j=o.mentioned_users,g=c(),v=n.convertValue(+y,"length","ft");return l.jsxs("div",{className:g.wrapper,children:[u&&l.jsx(e.Typography,{"data-testid":"".concat("PCCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:r.formatMentionText(u,j,a.isNativeDetected)}),x&&l.jsxs(e.Typography,{className:g.infoField,children:["Time: ",l.jsx("span",{children:s.default.unix(x).format("MM.DD.YYYY, HH:mm")})]}),(y||0===y)&&l.jsxs(e.Typography,{className:g.infoField,children:["Hole Depth:"," ",l.jsx("span",{children:"".concat(Math.round(v).toLocaleString()," ").concat(n.getUnitDisplay("length"))})]}),h&&(h.signed_url||h.url||h.name)&&l.jsx("div",{className:g.attachment,children:l.jsx(i,{small:!0,attachmentUrl:h.signed_url||h.url,fileName:h.name,displayName:h.name})})]})};
