"use strict";var e=require("react/jsx-runtime"),u=require("../../hooks/useDisplayState.js"),t=require("@styled/css"),p=require("@styled/jsx");const h={lg:{size:56,radius:28,strokeWidth:5,animation:"animateSpinnerLarge"},sm:{size:20,radius:10,strokeWidth:3,animation:"animateSpinnerSmall"}},w=({size:r="lg",isVisible:n=!0,onShown:a=()=>{},onHidden:o=()=>{}})=>{const{size:i,radius:m,strokeWidth:s,animation:d}=h[r],{onHide:l,onShow:c}=u.useDisplayState({animate:!0,show:n,onHidden:o,onShown:a});return e.jsx(p.Center,{inline:!0,animation:n?"popIn 150ms":"popOut 150ms",animationFillMode:"forwards",onAnimationEnd:n?c:l,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:t.css({animation:"spin 1.5s linear infinite"}),children:e.jsx("circle",{className:t.css({stroke:"text.primary",transformOrigin:"center center"}),style:{animation:`${d} 2s ease-in-out infinite`},cx:"50%",cy:"50%",r:m-s/2,strokeLinecap:"round",strokeWidth:s})})})};exports.AnimatedSpinner=w;
//# sourceMappingURL=animated-spinner.js.map
