"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react");const useIntersectionObserver=(e={})=>{let[t,r]=React.useState(!1),s=React.useRef(null);return React.useEffect(()=>{let t=new IntersectionObserver(e=>{let[t]=e;t&&(t.isIntersecting?r(!0):r(!1))},{...e}),{current:n}=s;return n&&t.observe(n),()=>{n&&t.unobserve(n)}},[e]),[s,t]};exports.default=useIntersectionObserver;
