"use strict";

var _ = _interopRequireDefault(require(".."));

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

var onProcess = function onProcess(value) {
  // This callback will be triggered when startValue and endValue aren't equal after mousedown/mousemove. You shouldn't call setState here.
  console.log('onProcess: ', value);
};

var Demo = function Demo() {
  var _React$useState = _react["default"].useState(128),
      _React$useState2 = _slicedToArray(_React$useState, 2),
      value = _React$useState2[0],
      onChange = _React$useState2[1];

  var _React$useState3 = _react["default"].useState([200, 500]),
      _React$useState4 = _slicedToArray(_React$useState3, 2),
      doubleValue = _React$useState4[0],
      onDoubleChange = _React$useState4[1];

  return /*#__PURE__*/_react["default"].createElement("div", {
    style: {
      width: 400
    }
  }, /*#__PURE__*/_react["default"].createElement("div", {
    style: {
      display: 'flex',
      marginBottom: 20
    }
  }, /*#__PURE__*/_react["default"].createElement(_["default"], {
    value: value // @ts-ignore
    ,
    onChange: onChange,
    onProcess: onProcess,
    min: 0,
    max: 1024,
    marks: [0, 1024],
    style: {
      marginRight: 30
    }
  }), /*#__PURE__*/_react["default"].createElement(_["default"], {
    value: value,
    onProcess: onProcess,
    min: 0,
    max: 1024,
    marks: [0, 1024]
  })), /*#__PURE__*/_react["default"].createElement(_["default"], {
    slider: "double",
    value: doubleValue // @ts-ignore
    ,
    onChange: onDoubleChange,
    onProcess: onProcess,
    min: 0,
    max: 1024,
    marks: [0, 1024]
  }));
};

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(Demo, null), document.getElementById('range-demo-5'));