import m from "../../../@babel/runtime/helpers/esm/slicedToArray.mjs";
import * as t from "react";
function R() {
  var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, u = t.useState(!1), a = m(u, 2), s = a[0], c = a[1], n = t.useRef(null), e = function() {
    window.clearTimeout(n.current);
  };
  t.useEffect(function() {
    return e;
  }, []);
  var f = function(l, o) {
    e(), n.current = window.setTimeout(function() {
      c(l), o && o();
    }, r);
  };
  return [s, f, e];
}
export {
  R as default
};
