import*as e from"react";import{useCallbackRef as r}from"./use-callback-ref.js";import{runIfFn as t}from"../../../utils/dist/esm/function.js";function n(n,o,m,s){var u=r(o);return e.useEffect((()=>{var e,r=null!=(e=t(m))?e:document;return r.addEventListener(n,u,s),()=>{r.removeEventListener(n,u,s)}}),[n,m,s,u]),()=>{var e;(null!=(e=t(m))?e:document).removeEventListener(n,u,s)}}export{n as useEventListener};
//# sourceMappingURL=use-event-listener.js.map
