import i from "react";
var b = Object.assign || function(t) {
  for (var e = 1; e < arguments.length; e++) {
    var o = arguments[e];
    for (var r in o)
      Object.prototype.hasOwnProperty.call(o, r) && (t[r] = o[r]);
  }
  return t;
}, s = /* @__PURE__ */ function() {
  function t(e, o) {
    for (var r = 0; r < o.length; r++) {
      var n = o[r];
      n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
    }
  }
  return function(e, o, r) {
    return o && t(e.prototype, o), r && t(e, r), e;
  };
}();
function v(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function m(t, e) {
  if (!t)
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e && (typeof e == "object" || typeof e == "function") ? e : t;
}
function _(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function, not " + typeof e);
  t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}
var g = function(e) {
  var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "span";
  return function(r) {
    _(n, r);
    function n() {
      var f, c, a, l;
      v(this, n);
      for (var h = arguments.length, p = Array(h), u = 0; u < h; u++)
        p[u] = arguments[u];
      return l = (c = (a = m(this, (f = n.__proto__ || Object.getPrototypeOf(n)).call.apply(f, [this].concat(p))), a), a.state = { focus: !1 }, a.handleFocus = function() {
        return a.setState({ focus: !0 });
      }, a.handleBlur = function() {
        return a.setState({ focus: !1 });
      }, c), m(a, l);
    }
    return s(n, [{
      key: "render",
      value: function() {
        return i.createElement(
          o,
          { onFocus: this.handleFocus, onBlur: this.handleBlur },
          i.createElement(e, b({}, this.props, this.state))
        );
      }
    }]), n;
  }(i.Component);
};
export {
  g as handleFocus
};
//# sourceMappingURL=interaction.js.map
