"use strict";var e=require("@material-ui/core"),t=require("moment"),a=require("@material-ui/icons/Warning"),i=require("../../../utils/mobileDetect.js"),n=require("../../UserMention/utils/index.js"),r=require("../../Attachment/index.js"),o=require("../../../utils/convert.js"),l=require("../../Typography.js"),s=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(t),m=c(a),u=e.makeStyles((function(e){return{text:{color:e.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},warningContainer:{display:"flex",alignItems:"center",gap:8,marginTop:16},warningIcon:{fill:e.palette.warning.main},infoField:{color:e.palette.primary.text6,"& span":{color:"#fff"}}}}));module.exports=function(e){var t=e.feedItem,a=t.point,c=(a=void 0===a?{}:a).showNoVisiblePointWarning,g=t.context.hookload_broomstick_comment,h=g.body,p=g.attachment,f=void 0===p?{}:p,x=g.data,j=x.timestamp,v=x.measuredDepth,y=x.activityLabel,N=x.hookload,b=t.mentioned_users,q=u(),w=o.convertValue(+v,"length","ft"),D=o.convertValue(+N,"force","klbf");return s.jsxs("div",{className:q.wrapper,children:[h&&s.jsx(l.Regular14,{"data-testid":"".concat("HookloadCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:n.formatMentionText(h,b,i.isNativeDetected)}),Number.isFinite(v)&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Measured Depth:"," ",s.jsx("span",{children:"".concat(Math.round(w).toLocaleString()," ").concat(o.getUnitDisplay("length"))})]}),N&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Hookload:"," ",s.jsx("span",{children:"".concat(Math.round(D).toLocaleString()," ").concat(o.getUnitDisplay("force"))})]}),y&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Activity: ",s.jsx("span",{children:y})]}),j&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Time: ",s.jsx("span",{children:d.default.unix(j).format("MM/DD/YY HH:mm")})]}),c&&s.jsxs("div",{className:q.warningContainer,children:[s.jsx(m.default,{className:q.warningIcon}),s.jsx(l.Regular12,{children:"This activity is disabled in the application settings or not in range"})]}),f&&(f.signed_url||f.url||f.name)&&s.jsx("div",{className:q.attachment,children:s.jsx(r,{small:!0,attachmentUrl:f.signed_url||f.url,fileName:f.name,displayName:f.name})})]})};
