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