import{r as l,j as n}from"./login-aN2dRsX6.js";import{u,c as x}from"./ThemeProvider-Cx_yflmw.js";const c=l.forwardRef(({bsPrefix:e,variant:s,animation:a="border",size:t,as:r="div",className:d,...m},o)=>{e=u(e,"spinner");const i=`${e}-${a}`;return n.jsx(r,{ref:o,...m,className:x(d,i,t&&`${i}-${t}`,s&&`text-${s}`)})});c.displayName="Spinner";const $=e=>{const[s,a]=l.useState(e.loading??!1);return n.jsxs("button",{style:{width:e.width},disabled:s||e.disable,className:`btn ${e.className??""} d-flex gap-2 align-items-center`,onClick:async()=>{var t;a(!0),await((t=e.onClick)==null?void 0:t.call(e)),a(!1)},children:[s?n.jsx(c,{size:"sm"}):e.icon,e.children]})};export{$ as B,c as S};
