import{j as f}from"./vendor-query-DxCcOIl8.js";import{r as n}from"./vendor-react-DO-R8FnS.js";function p({children:o,delay:a=0,className:c=""}){const s=n.useRef(null),[l,r]=n.useState(!1);return n.useEffect(()=>{const t=s.current;if(!t)return;const i=t.getBoundingClientRect();if(i.top<window.innerHeight&&i.bottom>0){r(!0);return}const e=new IntersectionObserver(([u])=>{u.isIntersecting&&(r(!0),e.disconnect())},{threshold:.08});return e.observe(t),()=>e.disconnect()},[]),f.jsx("div",{ref:s,className:`transition-all duration-700 ${l?"opacity-100 translate-y-0":"opacity-0 translate-y-5"} ${c}`,style:{transitionDelay:`${a}ms`},children:o})}export{p as F};