"use strict";var e=require("prop-types"),a=require("@material-ui/core"),r=require("./utils.js"),t=require("../../../utils/StageDesignVActualUtils.js"),i=require("react/jsx-runtime"),n=a.makeStyles((function(e){return{barContainer:{position:"relative",height:"24px",width:"100%"},designBar:function(e){var a=e.designBarPercent;return{position:"absolute",background:"#2BCCFF",opacity:.2,top:"4px",bottom:"4px",width:"".concat(a,"%"),borderRadius:"2px"}},actualBar:function(e){var a=e.showWarning,r=e.actualBarPercent;return{position:"absolute",background:a?"linear-gradient(to right, #2BCCFF , #F44336)":"#2BCCFF",top:"8px",bottom:"8px",width:"".concat(r,"%"),borderRadius:"2px"}},emptyBar:{position:"absolute",top:"4px",bottom:"4px",width:"100%",borderRadius:"2px",background:e.isLightTheme?"#e2e2e2":"#484848"}}})),s=function(e){var a=e.designVal,s=e.actualVal,o=e.isCalcMode,c=r.getBarPercents(a,s),u=c.designBarPercent,l=c.actualBarPercent,d=t.getDifference(a,s),p=t.getIsGreaterThanTenPercent(d),g=n({showWarning:o?s>a:p,designBarPercent:u,actualBarPercent:l});return i.jsxs("div",{className:g.barContainer,children:[!a&&!s&&i.jsx("div",{className:g.emptyBar}),i.jsx("div",{className:g.designBar}),i.jsx("div",{className:g.actualBar})]})};s.propTypes={designVal:e.number,actualVal:e.number,isCalcMode:e.bool},s.defaultProps={designVal:void 0,actualVal:void 0,isCalcMode:!1},module.exports=s;
//# sourceMappingURL=ComparisonBar.js.map
