import{shape as a}from"prop-types";import{makeStyles as t,Grid as e,Typography as n}from"@material-ui/core";import{convertValue as i,getUnitDisplay as l}from"../../../../../utils/convert.js";import{jsxs as r,jsx as c}from"react/jsx-runtime";var o="surveyStationActivity",s=t((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}}})),d=function(a){return a&&"number"==typeof a?a.toFixed(2):"-"},m=function(a){var t,m,p=a.feedItem,h=s(),u=(null===(t=p.context)||void 0===t||null===(m=t.survey_station)||void 0===m?void 0:m.data)||{},v=u.measured_depth,y=u.inclination,b=u.azimuth,f=u.tvd,N=u.vertical_section,g=u.dls,x=i(v,"length","ft"),V=i(f,"length","ft"),T=i(N,"length","ft"),_=i(g,"anglePerLength","dp100f");return r(e,{spacing:16,justify:"flex-start",className:h.actualPointContainer,children:[r(e,{item:!0,className:h.labelGrid,children:[c(n,{variant:"body2",className:h.planText,children:"Survey at:"}),c(n,{variant:"body2",className:h.planText,children:"Inc:"}),c(n,{variant:"body2",className:h.planText,children:"Azi:"})]}),r(e,{item:!0,className:h.columnWithMargin,children:[r(n,{variant:"body2","data-testid":"".concat(o,"_lastSurvey"),className:h.pointValue,children:[d(x),r(n,{variant:"body2",component:"span",className:h.planUnit,children:["(",l("length"),")"]})]}),r(n,{variant:"body2","data-testid":"".concat(o,"_inclination"),className:h.pointValue,children:[d(y),c(n,{variant:"body2",component:"span",className:h.planUnit,children:"°"})]}),r(n,{variant:"body2","data-testid":"".concat(o,"_azimuth"),className:h.pointValue,children:[d(b),c(n,{variant:"body2",component:"span",className:h.planUnit,children:"°"})]})]}),r(e,{item:!0,className:h.labelGrid,children:[c(n,{variant:"body2",className:h.planText,children:"TVD:"}),c(n,{variant:"body2",className:h.planText,children:"VS:"}),c(n,{variant:"body2",className:h.planText,children:"DLS:"})]}),r(e,{item:!0,children:[r(n,{variant:"body2","data-testid":"".concat(o,"_TVD"),className:h.pointValue,children:[d(V),r(n,{variant:"body2",component:"span",className:h.planUnit,children:["(",l("length"),")"]})]}),r(n,{variant:"body2","data-testid":"".concat(o,"_VS"),className:h.pointValue,children:[d(T),r(n,{variant:"body2",component:"span",className:h.planUnit,children:["(",l("length"),")"]})]}),r(n,{variant:"body2","data-testid":"".concat(o,"_DLS"),className:h.pointValue,children:[d(_),c(n,{variant:"body2",component:"span",className:h.planUnit,children:l("anglePerLength")})]})]})]})};m.propTypes={feedItem:a({context:a({survey_station:a({data:a().isRequired}).isRequired}).isRequired}).isRequired};export{m as default};
