text: "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports["default"] = void 0;
  
  var _react = _interopRequireDefault(require("react"));
  
  var _propTypes = _interopRequireDefault(require("prop-types"));
  
  var _classnames2 = _interopRequireDefault(require("classnames"));
  
  var _constants = _interopRequireDefault(require("../../constants"));
  
  var _modifiers = _interopRequireDefault(require("../../modifiers"));
  
  var _element = _interopRequireDefault(require("../element"));
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  
  var colors = [null].concat(Object.keys(_constants["default"].COLORS).map(function (key) {
    return _constants["default"].COLORS[key];
  }));
  
  var Progress = function Progress(_ref) {
    var _classnames;
  
    var className = _ref.className,
        value = _ref.value,
        max = _ref.max,
        color = _ref.color,
        size = _ref.size,
        props = _objectWithoutProperties(_ref, ["className", "value", "max", "color", "size"]);
  
    return _react["default"].createElement(_element["default"], _extends({
      renderAs: "progress"
    }, props, {
      value: value,
      max: max,
      className: (0, _classnames2["default"])('progress', className, (_classnames = {}, _defineProperty(_classnames, "is-".concat(color), color), _defineProperty(_classnames, "is-".concat(size), size), _classnames))
    }));
  };
  
  Progress.propTypes = _objectSpread({}, _modifiers["default"].propTypes, {
    className: _propTypes["default"].string,
    style: _propTypes["default"].shape({}),
    color: _propTypes["default"].oneOf(colors),
    size: _propTypes["default"].oneOf(['small', 'medium', 'large']),
    value: _propTypes["default"].number.isRequired,
    max: _propTypes["default"].number.isRequired
  });
  Progress.defaultProps = _objectSpread({}, _modifiers["default"].defaultProps, {
    className: undefined,
    style: undefined,
    color: undefined,
    size: undefined
  });
  var _default = Progress;
  exports["default"] = _default;
  //# sourceMappingURL=progress.js.map