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