import { useEffect, useRef } from 'react';
import { clickAnywhere } from '../click-anywhere';
export var useClickAnywhere = function useClickAnywhere(cb) {
  var ref = useRef(null);
  useEffect(function () {
    if (ref.current) {
      return clickAnywhere(ref.current, cb);
    }
  }, []);
  return ref;
};