import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
import React__default from 'react';
import { Slider } from '@mui/material';
import { SliderWrapper } from './style.js';
import theme from '../../../Globals/theme.js';
import { ThemeProvider } from 'styled-components';
import globalStyle from '../../../Globals/global-styles.js';

var marks = [{
  value: 0
}, {
  value: 4.166
}, {
  value: 8.332
}, {
  value: 12.498
}, {
  value: 16.664
}, {
  value: 20.83
}, {
  value: 24.996
}, {
  value: 29.162
}, {
  value: 33.328
}, {
  value: 37.494
}, {
  value: 41.66
}, {
  value: 45.826
}, {
  value: 49.992
}, {
  value: 54.158
}, {
  value: 58.324
}, {
  value: 62.49
}, {
  value: 66.656
}, {
  value: 70.822
}, {
  value: 74.988
}, {
  value: 79.154
}, {
  value: 83.32
}, {
  value: 87.486
}, {
  value: 91.652
}, {
  value: 95.818
}, {
  value: 100
}];
var HourScaledSlider = function HourScaledSlider() {
  function valueLabelFormat(value) {
    return marks.findIndex(function (mark) {
      return mark.value === value;
    });
  }

  var _React$useState = React__default.useState([20.83, 62.49]),
      _React$useState2 = _slicedToArray(_React$useState, 2),
      value = _React$useState2[0],
      setValue = _React$useState2[1];

  var handleChange = function handleChange(newValue) {
    setValue(newValue);
  };

  return /*#__PURE__*/React__default.createElement(ThemeProvider, {
    theme: theme
  }, /*#__PURE__*/React__default.createElement(globalStyle, null), /*#__PURE__*/React__default.createElement(SliderWrapper, null, /*#__PURE__*/React__default.createElement(Slider, {
    "aria-label": "Restricted values",
    value: value,
    valueLabelFormat: valueLabelFormat,
    step: null,
    valueLabelDisplay: "auto",
    marks: marks,
    onChange: handleChange
  })));
};

export { HourScaledSlider, HourScaledSlider as default };
//# sourceMappingURL=index.js.map
