"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const React = require("react");
const useClickOutside = (refObject, callback) => {
  const handleClickOutside = (e) => {
    var _a;
    if (!((_a = refObject == null ? void 0 : refObject.current) == null ? void 0 : _a.contains(e.target))) {
      callback();
    }
  };
  React.useEffect(() => {
    document.addEventListener("mousedown", handleClickOutside);
    return () => document.removeEventListener("mousedown", handleClickOutside);
  });
};
exports.useClickOutside = useClickOutside;
//# sourceMappingURL=useClickOutSide.js.map
