import{Ct as e,L as t,N as n,Nt as r,O as i,Pt as a,R as o,Vt as s,Wt as c,X as l,d as u,ft as d,g as f,mt as p,o as m,pt as h,s as g,z as _}from"./BT3KAag_.js";import"./t62M88qj.js";import{n as v,t as y}from"./fpcthsge2.js";var b=y({base:`inline-flex shrink-0 items-center justify-center gap-1.5 rounded-[var(--radius-md)] font-normal whitespace-nowrap transition-[color,background] duration-150 cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:w-[var(--icon-md)] [&_svg:not([class*='size-'])]:h-[var(--icon-md)]`,variants:{variant:{default:`bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] border border-[var(--color-border)] hover:bg-[var(--color-bg-hover)]`,ghost:`bg-transparent text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-bg-hover)]`,outline:`bg-transparent text-[var(--color-text-secondary)] border border-[var(--color-border)] hover:bg-[var(--color-bg-hover)]`,accent:`bg-[var(--color-accent)] text-[var(--color-accent-text,#ededef)] hover:bg-[var(--color-accent-hover)] border border-transparent disabled:opacity-100 disabled:bg-[var(--color-bg-hover)] disabled:text-[var(--color-accent-text-disabled)]`,destructive:`bg-[var(--color-accent)] text-[var(--color-accent-text,#ededef)] hover:bg-[var(--color-accent-hover)] border border-transparent disabled:opacity-100 disabled:bg-[var(--color-bg-hover)] disabled:text-[var(--color-accent-text-disabled)]`,link:`text-[var(--color-accent-fg)] underline-offset-4 hover:underline`},size:{default:`h-[var(--btn-height,2rem)] px-2.5 text-sm [&_svg:not([class*='size-'])]:w-[var(--icon-md)] [&_svg:not([class*='size-'])]:h-[var(--icon-md)]`,sm:`h-[var(--btn-height-sm,1.5rem)] px-2 text-xs [&_svg:not([class*='size-'])]:w-[var(--icon-sm)] [&_svg:not([class*='size-'])]:h-[var(--icon-sm)]`,lg:`h-[var(--btn-height-lg,2.25rem)] px-3 text-sm [&_svg:not([class*='size-'])]:w-[var(--icon-lg)] [&_svg:not([class*='size-'])]:h-[var(--icon-lg)]`,icon:`size-[var(--icon-btn-height,2rem)] p-0 max-md:rounded-[var(--radius-xl)] [&_svg:not([class*='size-'])]:w-[var(--icon-btn-icon-size)] [&_svg:not([class*='size-'])]:h-[var(--icon-btn-icon-size)]`}},defaultVariants:{variant:`default`,size:`default`}}),x=_(`<span class="btn-spinner svelte-1q39rn8" aria-hidden="true"></span> <span class="btn-label-hidden svelte-1q39rn8"><!></span>`,1),S=_(`<a><!></a>`),C=_(`<span class="btn-spinner svelte-1q39rn8" aria-hidden="true"></span> <span class="btn-label-hidden svelte-1q39rn8"><!></span>`,1),w=_(`<button><!></button>`);function T(_,y){a(y,!0);let T=m(y,`variant`,3,`default`),E=m(y,`size`,3,`default`),D=m(y,`ref`,15,null),O=m(y,`href`,3,void 0),k=m(y,`type`,3,`button`),A=m(y,`loading`,3,!1),j=g(y,[`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`loading`,`children`]),M=e(()=>y.disabled||A());var N=o(),P=h(N),F=e=>{var r=S();f(r,e=>({class:e,href:l(M)?void 0:O(),"aria-disabled":l(M),"aria-busy":A(),role:l(M)?`link`:void 0,tabindex:l(M)?-1:void 0,...j}),[()=>v(b({variant:T(),size:E()}),A()&&`relative`,y.class)],void 0,void 0,`svelte-1q39rn8`);var a=d(r),m=e=>{var n=x(),r=p(h(n),2);i(d(r),()=>y.children??c),s(r),t(e,n)},g=e=>{var n=o();i(h(n),()=>y.children??c),t(e,n)};n(a,e=>{A()?e(m):e(g,-1)}),s(r),u(r,e=>D(e),()=>D()),t(e,r)},I=e=>{var r=w();f(r,e=>({class:e,type:k(),disabled:l(M),"aria-busy":A(),...j}),[()=>v(b({variant:T(),size:E()}),A()&&`relative`,y.class)],void 0,void 0,`svelte-1q39rn8`);var a=d(r),m=e=>{var n=C(),r=p(h(n),2);i(d(r),()=>y.children??c),s(r),t(e,n)},g=e=>{var n=o();i(h(n),()=>y.children??c),t(e,n)};n(a,e=>{A()?e(m):e(g,-1)}),s(r),u(r,e=>D(e),()=>D()),t(e,r)};n(P,e=>{O()?e(F):e(I,-1)}),t(_,N),r()}export{b as n,T as t};