"use strict";

require("core-js/modules/es.object.define-property.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FcrVolumeIndicator = void 0;
require("core-js/modules/es.error.to-string.js");
require("core-js/modules/es.array.map.js");
require("core-js/modules/es.date.to-string.js");
require("core-js/modules/es.object.to-string.js");
require("core-js/modules/es.regexp.to-string.js");
require("core-js/modules/esnext.iterator.constructor.js");
require("core-js/modules/esnext.iterator.map.js");
var _classnames = _interopRequireDefault(require("classnames"));
var _range = _interopRequireDefault(require("lodash/range"));
require("./index.css");
var _jsxRuntime = require("react/jsx-runtime");
var FcrVolumeIndicator = exports.FcrVolumeIndicator = function FcrVolumeIndicator(_ref) {
  var value = _ref.value,
    _ref$barCount = _ref.barCount,
    barCount = _ref$barCount === void 0 ? 8 : _ref$barCount;
  var power = value * barCount;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: "fcr-volume-indicator",
    children: (0, _range["default"])(0, barCount).map(function (i) {
      return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: (0, _classnames["default"])('fcr-volume-indicator__point', {
          'is-active': power > 0 && i <= power
        })
      }, i.toString());
    })
  });
};