import{_ as p}from"./D4cd7EFQ.js";import{d as u,r as c,h as _,i as w,c as h,w as l,T as b,o as i,a as v,b as T,u as d,f as m,n as x,j as g}from"./m2W8DxR4.js";import{_ as k}from"./krbhwCDS.js";import"./DT-hKSom.js";const y=u({__name:"ScrollToTop",setup(B){const f=()=>{window.scrollTo({top:0,behavior:"smooth"})},n=c("1rem"),s=c(!1);let e=null;const t=()=>{s.value=window.scrollY>50};return _(()=>{const o=document.querySelector("footer");o&&(e=new IntersectionObserver(a=>{a.forEach(r=>{n.value=r.isIntersecting?`${o.clientHeight+16}px`:"1rem"})},{root:null,threshold:0}),e.observe(o)),window.addEventListener("scroll",t),t()}),w(()=>{e&&e.disconnect(),window.removeEventListener("scroll",t)}),(o,a)=>{const r=p;return i(),h(b,{name:"fade"},{default:l(()=>[d(s)?(i(),v("div",{key:0,class:"fixed right-4 z-50 cursor-pointer transition-all duration-300",style:x({bottom:d(n)})},[m(r,{"aria-label":o.$t("ariaLabels.scrollToTop"),size:"wsIcon",class:"hover:bg-accent/90 !text-primary ws-gradient-border-animated cursor-pointer transition-colors",onClick:f},{default:l(()=>[m(k,{"aria-hidden":"true"})]),_:1},8,["aria-label"])],4)):T("",!0)]),_:1})}}}),z=g(y,[["__scopeId","data-v-b37fcf76"]]);export{z as default};
