import{jsx as e}from"react/jsx-runtime";import{useDisplayState as p}from"../../hooks/useDisplayState.js";import{cn as s}from"../../lib/cn.js";const h={lg:{size:56,radius:28,strokeWidth:5,animationClass:"animate-[animateSpinnerLarge_2s_ease-in-out_infinite]"},sm:{size:20,radius:10,strokeWidth:3,animationClass:"animate-[animateSpinnerSmall_2s_ease-in-out_infinite]"}},f=({size:a="lg",isVisible:n=!0,onShown:o=()=>{},onHidden:r=()=>{}})=>{const{size:i,radius:m,strokeWidth:t,animationClass:l}=h[a],{onHide:d,onShow:c}=p({animate:!0,show:n,onHidden:r,onShown:o});return e("div",{className:s("inline-flex items-center justify-center",n?"animate-[popIn_150ms]":"animate-[popOut_150ms]","[animation-fill-mode:forwards]"),onAnimationEnd:n?c:d,children:e("svg",{width:i,height:i,viewBox:`0 0 ${i} ${i}`,fill:"none",stroke:"none",xmlns:"http://www.w3.org/2000/svg",className:"animate-[spin_1.5s_linear_infinite]",children:e("circle",{className:s("stroke-text-primary origin-center",l),cx:"50%",cy:"50%",r:m-t/2,strokeLinecap:"round",strokeWidth:t})})})};export{f as AnimatedSpinner};
//# sourceMappingURL=animated-spinner.js.map
