"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("react");function o(r){const e=s.useRef(null);return s.useEffect(()=>{const t=u=>{const n=e==null?void 0:e.current;!n||n.contains((u==null?void 0:u.target)||null)||r(u)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,r]),{containerRef:e}}exports.useOnClickOutside=o;
