import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
import "./style/AudioRange.css";
var cn = 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.createElement("input", _extends({
    className: cn([className]),
    style: {
      backgroundSize: "".concat(colorPercent, "% 100%")
    },
    type: "range",
    min: "0",
    max: maxValue,
    step: step,
    value: value,
    onChange: onChange,
    onMouseUp: onMouseUp,
    onTouchEnd: onTouchEnd
  }, filterDataAttrs(dataAttrs)));
};
export default AudioRange;