"use strict";

require("core-js/modules/es.object.define-property.js");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useClickAnywhere = void 0;
var _react = require("react");
var _clickAnywhere = require("../click-anywhere");
var useClickAnywhere = exports.useClickAnywhere = function useClickAnywhere(cb) {
  var ref = (0, _react.useRef)(null);
  (0, _react.useEffect)(function () {
    if (ref.current) {
      return (0, _clickAnywhere.clickAnywhere)(ref.current, cb);
    }
  }, []);
  return ref;
};