import{string as e,shape as i}from"prop-types";import{makeStyles as r,Typography as t}from"@material-ui/core";import a from"@material-ui/core/colors/blue";import{getUnitDisplay as n}from"../../../../../utils/convert.js";import{jsxs as o,jsx as l}from"react/jsx-runtime";var p=r((function(e){return{wrapper:{display:"flex",flexDirection:"column",justifyContent:"space-between",marginRight:"5%"},predictionItem:{color:a[300]},unit:{display:"inline",color:e.palette.grey[400],marginLeft:5}}})),s=function(e){var i=e.title,r=e.fieldName,a=e.predictionsData,s=p();if(!a)return null;var c=a[r];return c?o("li",{className:s.wrapper,children:[o(t,{variant:"subtitle2",children:[i,o(t,{className:s.unit,variant:"caption",children:["(",n("pressure"),")"]})]}),l(t,{variant:"h6",className:s.predictionItem,children:Number.isFinite(c)?parseFloat(c.toFixed(0)):c})]}):null};s.propTypes={title:e.isRequired,fieldName:e.isRequired,predictionsData:i().isRequired};export{s as default};
