"use strict";var a=require("prop-types"),e=require("@material-ui/core"),t=require("../../../../../utils/convert.js"),n=require("react/jsx-runtime"),i="surveyStationActivity",s=e.makeStyles((function(a){return{labelGrid:{marginRight:7},planText:{color:a.palette.grey[400]},planUnit:{fontSize:12,color:a.palette.grey[400],marginLeft:5},pointValue:{display:"flex",alignItems:"center"},columnWithMargin:{marginRight:40},actualPointContainer:{display:"flex",flexGrow:1}}})),r=function(a){return a&&"number"==typeof a?a.toFixed(2):"-"},l=function(a){var l,o,p=a.feedItem,c=s(),d=(null===(l=p.context)||void 0===l||null===(o=l.survey_station)||void 0===o?void 0:o.data)||{},y=d.measured_depth,h=d.inclination,m=d.azimuth,u=d.tvd,g=d.vertical_section,x=d.dls,v=t.convertValue(y,"length","ft"),T=t.convertValue(u,"length","ft"),j=t.convertValue(g,"length","ft"),b=t.convertValue(x,"anglePerLength","dp100f");return n.jsxs(e.Grid,{spacing:16,justify:"flex-start",className:c.actualPointContainer,children:[n.jsxs(e.Grid,{item:!0,className:c.labelGrid,children:[n.jsx(e.Typography,{variant:"body2",className:c.planText,children:"Survey at:"}),n.jsx(e.Typography,{variant:"body2",className:c.planText,children:"Inc:"}),n.jsx(e.Typography,{variant:"body2",className:c.planText,children:"Azi:"})]}),n.jsxs(e.Grid,{item:!0,className:c.columnWithMargin,children:[n.jsxs(e.Typography,{variant:"body2","data-testid":"".concat(i,"_lastSurvey"),className:c.pointValue,children:[r(v),n.jsxs(e.Typography,{variant:"body2",component:"span",className:c.planUnit,children:["(",t.getUnitDisplay("length"),")"]})]}),n.jsxs(e.Typography,{variant:"body2","data-testid":"".concat(i,"_inclination"),className:c.pointValue,children:[r(h),n.jsx(e.Typography,{variant:"body2",component:"span",className:c.planUnit,children:"°"})]}),n.jsxs(e.Typography,{variant:"body2","data-testid":"".concat(i,"_azimuth"),className:c.pointValue,children:[r(m),n.jsx(e.Typography,{variant:"body2",component:"span",className:c.planUnit,children:"°"})]})]}),n.jsxs(e.Grid,{item:!0,className:c.labelGrid,children:[n.jsx(e.Typography,{variant:"body2",className:c.planText,children:"TVD:"}),n.jsx(e.Typography,{variant:"body2",className:c.planText,children:"VS:"}),n.jsx(e.Typography,{variant:"body2",className:c.planText,children:"DLS:"})]}),n.jsxs(e.Grid,{item:!0,children:[n.jsxs(e.Typography,{variant:"body2","data-testid":"".concat(i,"_TVD"),className:c.pointValue,children:[r(T),n.jsxs(e.Typography,{variant:"body2",component:"span",className:c.planUnit,children:["(",t.getUnitDisplay("length"),")"]})]}),n.jsxs(e.Typography,{variant:"body2","data-testid":"".concat(i,"_VS"),className:c.pointValue,children:[r(j),n.jsxs(e.Typography,{variant:"body2",component:"span",className:c.planUnit,children:["(",t.getUnitDisplay("length"),")"]})]}),n.jsxs(e.Typography,{variant:"body2","data-testid":"".concat(i,"_DLS"),className:c.pointValue,children:[r(b),n.jsx(e.Typography,{variant:"body2",component:"span",className:c.planUnit,children:t.getUnitDisplay("anglePerLength")})]})]})]})};l.propTypes={feedItem:a.shape({context:a.shape({survey_station:a.shape({data:a.shape().isRequired}).isRequired}).isRequired}).isRequired},module.exports=l;
