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