"use strict";var t=require("react");function o(n){const r=t.useRef(null),u=t.useRef(n);return t.useLayoutEffect(()=>{u.current=n}),t.useEffect(()=>{const e=c=>{const s=r.current;s&&!s.contains(c.target)&&u.current(c)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[]),r}exports.useClickAway=o;
//# sourceMappingURL=useClickAway.js.map
