import { useEventListener as n } from "./useEventListener.js";
import { flatValue as r } from "../helpers/functions.js";
function c(i, o) {
  n(document, "click", (e) => {
    if (!document.contains(e.target))
      return;
    r(i).map((t) => t.value).filter((t) => !!t).some((t) => t == null ? void 0 : t.contains(e.target)) || o();
  });
}
export {
  c as useClickOutside
};
//# sourceMappingURL=useClickOutside.js.map
