
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.github.io
 */

import{d as c,a as i,Y as d,r as m,g as o,z as u,b as t,w as p,i as n,c as g,A as v,aq as f,ar as _,aa as k,a0 as y,j as h}from"./index-nGFMSQGw.js";const x=c({name:"BackTop",__name:"index",setup(C){const s={enterActiveClass:"ease-out duration-300",enterFromClass:"opacity-0 translate-y-4 lg-translate-y-0 lg-scale-95",enterToClass:"opacity-100 translate-y-0 lg-scale-100",leaveActiveClass:"ease-in duration-200",leaveFromClass:"opacity-100 translate-y-0 lg-scale-100",leaveToClass:"opacity-0 translate-y-4 lg-translate-y-0 lg-scale-95"};i(()=>{window.addEventListener("scroll",a),a()}),d(()=>{window.removeEventListener("scroll",a)});const e=m(null);function a(){e.value=document.documentElement.scrollTop}function r(){document.documentElement.scrollTo({top:0,behavior:"smooth"})}return(w,b)=>{const l=h;return o(),u(y,{to:"body"},[t(k,f(_(s)),{default:p(()=>[n(e)&&n(e)>=200?(o(),g("div",{key:0,class:"fixed bottom-4 right-4 z-1000 h-12 w-12 flex cursor-pointer items-center justify-center rounded-full bg-white shadow-lg ring-1 ring-stone-3 ring-inset dark-bg-dark hover-bg-stone-1 dark-ring-stone-7 dark-hover-bg-dark/50",onClick:r},[t(l,{name:"i-icon-park-outline:to-top-one",size:24})])):v("",!0)]),_:1},16)])}}});export{x as _};
