import{dt as e,ft as t,gt as n}from"../../index.js";var r=n(t(),1),i=e();function a({children:e,className:t=``,delay:n=0}){let a=(0,r.useRef)(null),[o,s]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=a.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(s(!0),t.disconnect())},{threshold:.14});return t.observe(e),()=>t.disconnect()},[]),(0,i.jsx)(`div`,{ref:a,className:`reveal ${o?`is-visible`:``} ${t}`,style:{transitionDelay:`${n}ms`},children:e})}export{a as Reveal};