"use strict";var e=require("react/jsx-runtime"),u=require("../../hooks/useDisplayState.js"),t=require("../../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]"}},p=({size:a="lg",isVisible:n=!0,onShown:r=()=>{},onHidden:o=()=>{}})=>{const{size:i,radius:m,strokeWidth:s,animationClass:l}=h[a],{onHide:d,onShow:c}=u.useDisplayState({animate:!0,show:n,onHidden:o,onShown:r});return e.jsx("div",{className:t.cn("inline-flex items-center justify-center",n?"animate-[popIn_150ms]":"animate-[popOut_150ms]","[animation-fill-mode:forwards]"),onAnimationEnd:n?c:d,children:e.jsx("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.jsx("circle",{className:t.cn("stroke-text-primary origin-center",l),cx:"50%",cy:"50%",r:m-s/2,strokeLinecap:"round",strokeWidth:s})})})};exports.AnimatedSpinner=p;
//# sourceMappingURL=animated-spinner.js.map
