"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _uiHelpers = require("@megafon/ui-helpers");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var cn = (0, _uiHelpers.cnCreate)('mfui-9-audio-range');
var AudioRange = function AudioRange(_ref) {
  var className = _ref.className,
    maxValue = _ref.maxValue,
    value = _ref.value,
    step = _ref.step,
    colorPercent = _ref.colorPercent,
    onChange = _ref.onChange,
    onMouseUp = _ref.onMouseUp,
    onTouchEnd = _ref.onTouchEnd,
    dataAttrs = _ref.dataAttrs;
  return /*#__PURE__*/_react["default"].createElement("input", (0, _extends2["default"])({
    className: cn([className]),
    style: {
      backgroundSize: "".concat(colorPercent, "% 100%")
    },
    type: "range",
    min: "0",
    max: maxValue,
    step: step,
    value: value,
    onChange: onChange,
    onMouseUp: onMouseUp,
    onTouchEnd: onTouchEnd
  }, (0, _uiHelpers.filterDataAttrs)(dataAttrs)));
};
var _default = exports["default"] = AudioRange;