"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ImpactBar = ImpactBar;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _eui = require("@elastic/eui");
var _react = _interopRequireDefault(require("react"));
var _style = require("../../../utils/style");
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */

// TODO: extend from EUI's EuiProgress prop interface

const style = {
  width: `${_style.unit * 6}px`
};
function ImpactBar({
  value,
  size = 'm',
  max = 100,
  color = 'primary',
  ...rest
}) {
  return /*#__PURE__*/_react.default.createElement(_eui.EuiProgress, (0, _extends2.default)({
    size: size,
    value: value,
    max: max,
    color: color,
    style: style
  }, rest));
}