import{_ as c}from"./HollowDotsSpinner-aede4138.js";import{m as u,l as f,o as a,c as i,b as d,a as m,e as p,F as _}from"./app-13978987.js";const v={key:0,class:"mt-5 flex justify-center"},y={__name:"IntersectionObserver",props:{targetView:{default:null,required:!0},observerCondition:{type:Boolean,default:!0},loader:{type:Boolean,default:!1},afterIntersection:{type:Function,default:()=>{}}},setup(t){const e=t,r=u(null);let o=null;const l=n=>{n.forEach(s=>{s.isIntersecting&&e.observerCondition&&e.afterIntersection()})};return f(()=>{e.observerCondition&&(o=new IntersectionObserver(l,{root:null,rootMargin:"10px",threshold:.5}),o.observe(r.value))}),(n,s)=>(a(),i(_,null,[d("div",{ref_key:"intersectionTargetView",ref:r},null,512),t.loader?(a(),i("div",v,[m(c)])):p("",!0)],64))}};export{y as _};
