"use strict";var e=require("prop-types"),a=require("moment"),t=require("@material-ui/core"),i=require("../../../../../utils/convert.js"),r=require("../../../../../utils/accuracy.js"),n=require("react/jsx-runtime");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(a),s=t.makeStyles((function(e){return{wrapper:{display:"flex",flexDirection:"column",margin:"0 20px 10px 0",minWidth:"290px"},planValueWrapper:{display:"flex",alignItems:"baseline"},planUnit:{color:e.palette.grey[400],marginLeft:5},planText:{color:e.palette.grey[400]}}})),u=function(e){var a,l=e.timestamp,u=e.initialPlanName,p=e.cumulativeTvdChange,o=e.accuracyData,m=s(),d=l?c.default.unix(l).format("MM/DD/YY"):"",y=r.purifyPlanName(u);return p&&(y="".concat(y,", ").concat(p," ft cumulative TVD change")),n.jsxs("div",{className:"c-survey-station-feed-item__accuracy-plan",children:[n.jsx(t.Typography,{variant:"subtitle1",children:"Minimum Distance to Plan:"}),n.jsxs("div",{className:m.planValueWrapper,children:[n.jsx(t.Typography,{variant:"h5",style:{color:r.getColorBySeverity(o)},children:parseFloat(null===(a=i.convertValue(null==o?void 0:o.distance_to_plan,"length","ft"))||void 0===a?void 0:a.toFixed(1))}),n.jsxs(t.Typography,{variant:"caption",className:m.planUnit,children:["(",i.getUnitDisplay("length"),")"]})]}),n.jsx(t.Typography,{variant:"body1",className:m.planText,children:y||d})]})};u.propTypes={timestamp:e.number,initialPlanName:e.string,cumulativeTvdChange:e.string,accuracyData:e.shape().isRequired},u.defaultProps={timestamp:null,initialPlanName:"",cumulativeTvdChange:""},module.exports=u;
//# sourceMappingURL=AccuracyPlan.js.map
