/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/react-npm-horizontal-status-indicator@1.3.0/lib/component/horizontal_status_indicator.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var HorizontalStatusIndicator=function(){function e(t){_classCallCheck(this,e);var r=_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.state={width:null},r}return _inherits(e,_react.Component),_createClass(e,[{key:"componentDidMount",value:function(){var e=_reactDom2.default.findDOMNode(this).parentElement.offsetWidth-10,t=this.props.children*e/100;this.setState({width:t})}},{key:"render",value:function(){var e={backgroundColor:this.getBarColor(this.props),height:"2px",width:this.state.width+"px",marginLeft:"5px",marginRight:"5px"};return _react2.default.createElement("hr",{id:"horizontal-bar",style:e})}},{key:"getBarColor",value:function(e){return e.colour?e.colour:e.inverted?e.children<=25?"green":e.children>25&&e.children<=50?"blue":e.children>50&&e.children<=75?"yellow":"red":e.children<=25?"red":e.children>25&&e.children<=50?"yellow":e.children>50&&e.children<=75?"blue":"green"}}]),e}();exports.default=HorizontalStatusIndicator;
//# sourceMappingURL=/sm/33dfce981d441e220ceac8731e6fb9b7079bfb91b1201ed62de13d79352d6ca4.map