"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("prop-types"),r=require("moment"),a=require("@material-ui/core"),i=require("../../../utils/index.js"),s=require("../../../utils/mobileDetect.js"),n=require("../../Typography.js"),l=require("../../Attachment/index.js"),u=require("../../UserMention/utils/index.js"),d=require("../../CollapsibleContent.js"),m=require("../../../constants/feed.js"),o=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=c(e),f=c(t),h=c(r),x=a.makeStyles((function(e){return{message:{lineHeight:"20px"},container:{marginBottom:4,lineHeight:"20px"},label:{color:e.palette.primary.text6}}})),g=function(e){var t=e.feedItem,r=x(),c=t.context,p=c[m.FEED_ITEM_TYPES.DEPTH_COMMENTS],f=p.body,g=p.commentDepth,j=p.recordTimestamp,q=c.attachment,T=t.mentioned_users,E=i.getUnitDisplay("length"),b=i.convertValue(+g,"length","ft");return o.jsxs(a.Box,{whiteSpace:"pre-wrap",children:[f&&o.jsx(d,{children:o.jsx(n.Regular14,{className:r.message,"data-testid":"".concat("DepthCommentFeedItem","_message"),variant:"body1",children:u.formatMentionText(f,T,s.isNativeDetected)})}),o.jsxs(a.Box,{mt:1,mb:1,children:[o.jsxs(n.Regular14,{className:r.container,children:[o.jsx("span",{className:r.label,children:"Depth: "}),"".concat(Math.round(b).toLocaleString()," ").concat(E)]}),j&&o.jsxs(n.Regular14,{className:r.container,children:[o.jsx("span",{className:r.label,children:"Record Time: "}),h.default.unix(j).format(m.FEED_ITEM_TIME_FORMAT)]})]}),q&&q.url&&o.jsx(l,{attachmentUrl:q.url,fileName:q.name,attachmentSize:q.size,size:"medium"})]})};g.propTypes={feedItem:f.default.shape({context:f.default.shape(p.default({},m.FEED_ITEM_TYPES.DEPTH_COMMENTS,f.default.shape({body:f.default.string.isRequired,attachment:f.default.shape({url:f.default.string,size:f.default.number}),commentDepth:f.default.oneOfType([f.default.string,f.default.number]).isRequired,recordTimestamp:f.default.number,timestamp:f.default.string.isRequired}).isRequired)).isRequired,mentioned_users:f.default.arrayOf(f.default.shape({}))}).isRequired},module.exports=g;
