import { useEffect as i } from "react";
const c = (e, n) => {
  i(() => {
    var r;
    function o(t) {
      e.current && n && typeof n == "function" && n();
    }
    return (r = e.current) == null || r.addEventListener("mousedown", o), () => {
      var t;
      (t = e.current) == null || t.removeEventListener("mousedown", o);
    };
  }, [e, e.current]);
};
export {
  c as useInsideClickCallback
};
