import { useEffect as f } from "react";
function i(n, r, e, t) {
  return t === void 0 && (t = { passive: !0 }), n.addEventListener(r, e, t), function() {
    return n.removeEventListener(r, e);
  };
}
function v(n, r, e, t) {
  f(function() {
    var u = n.current;
    if (e && u)
      return i(u, r, e, t);
  }, [n, r, e, t]);
}
export {
  i as addDomEvent,
  v as useDomEvent
};
//# sourceMappingURL=use-dom-event.es.js.map
