import { __exports as p } from "./index-_virtual69.js";
import E from "react";
import { __require as W } from "./index-prop-types.js";
var R;
function L() {
  if (R) return p;
  R = 1;
  function f(e) {
    "@babel/helpers - typeof";
    return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? f = function(r) {
      return typeof r;
    } : f = function(r) {
      return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
    }, f(e);
  }
  Object.defineProperty(p, "__esModule", {
    value: !0
  }), p.default = void 0;
  var s = b(E), o = O(/* @__PURE__ */ W());
  function O(e) {
    return e && e.__esModule ? e : { default: e };
  }
  function _(e) {
    if (typeof WeakMap != "function") return null;
    var t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
    return (_ = function(u) {
      return u ? r : t;
    })(e);
  }
  function b(e, t) {
    if (e && e.__esModule)
      return e;
    if (e === null || f(e) !== "object" && typeof e != "function")
      return { default: e };
    var r = _(t);
    if (r && r.has(e))
      return r.get(e);
    var n = {}, u = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for (var a in e)
      if (a !== "default" && Object.prototype.hasOwnProperty.call(e, a)) {
        var l = u ? Object.getOwnPropertyDescriptor(e, a) : null;
        l && (l.get || l.set) ? Object.defineProperty(n, a, l) : n[a] = e[a];
      }
    return n.default = e, r && r.set(e, n), n;
  }
  function P(e, t) {
    if (!(e instanceof t))
      throw new TypeError("Cannot call a class as a function");
  }
  function w(e, t) {
    for (var r = 0; r < t.length; r++) {
      var n = t[r];
      n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
    }
  }
  function q(e, t, r) {
    return t && w(e.prototype, t), e;
  }
  function I(e, t) {
    if (typeof t != "function" && t !== null)
      throw new TypeError("Super expression must either be null or a function");
    e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && y(e, t);
  }
  function y(e, t) {
    return y = Object.setPrototypeOf || function(n, u) {
      return n.__proto__ = u, n;
    }, y(e, t);
  }
  function C(e) {
    var t = F();
    return function() {
      var n = d(e), u;
      if (t) {
        var a = d(this).constructor;
        u = Reflect.construct(n, arguments, a);
      } else
        u = n.apply(this, arguments);
      return M(this, u);
    };
  }
  function M(e, t) {
    return t && (f(t) === "object" || typeof t == "function") ? t : v(e);
  }
  function v(e) {
    if (e === void 0)
      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    return e;
  }
  function F() {
    if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
    if (typeof Proxy == "function") return !0;
    try {
      return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
      })), !0;
    } catch {
      return !1;
    }
  }
  function d(e) {
    return d = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
      return r.__proto__ || Object.getPrototypeOf(r);
    }, d(e);
  }
  function N(e, t, r) {
    return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
  }
  var g = 0, m = 99999, h = /* @__PURE__ */ (function(e) {
    I(r, e);
    var t = C(r);
    function r(n, u) {
      var a;
      return P(this, r), a = t.call(this, n, u), N(v(a), "onChange", function(l) {
        var c = a.props.onChange, i = parseInt(l.target.value, 10);
        i = isNaN(i) ? 0 : Math.max(Math.min(m, i), g), c(i);
      }), a;
    }
    return q(r, [{
      key: "shouldComponentUpdate",
      value: function(u) {
        var a = this.props, l = a.value, c = a.label, i = a.placeholder;
        return l !== u.value || c !== u.label || i !== u.placeholder;
      }
    }, {
      key: "render",
      value: function() {
        var u = this.props, a = u.label, l = u.placeholder, c = u.value, i = u.styles, T = u.onBlur, B = u.onFocus;
        return /* @__PURE__ */ s.default.createElement("div", {
          className: i.inputRange
        }, /* @__PURE__ */ s.default.createElement("input", {
          className: i.inputRangeInput,
          placeholder: l,
          value: c,
          min: g,
          max: m,
          onChange: this.onChange,
          onFocus: B,
          onBlur: T
        }), /* @__PURE__ */ s.default.createElement("span", {
          className: i.inputRangeLabel
        }, a));
      }
    }]), r;
  })(s.Component);
  h.propTypes = {
    value: o.default.oneOfType([o.default.string, o.default.number]),
    label: o.default.oneOfType([o.default.element, o.default.node]).isRequired,
    placeholder: o.default.string,
    styles: o.default.shape({
      inputRange: o.default.string,
      inputRangeInput: o.default.string,
      inputRangeLabel: o.default.string
    }).isRequired,
    onBlur: o.default.func.isRequired,
    onFocus: o.default.func.isRequired,
    onChange: o.default.func.isRequired
  }, h.defaultProps = {
    value: "",
    placeholder: "-"
  };
  var S = h;
  return p.default = S, p;
}
export {
  L as __require
};
