import{B as e,E as t,H as n,It as r,M as i,Mt as a,Q as o,T as ee,U as s,W as c,Y as l,Z as u,_t as d,at as f,d as p,ft as m,ht as h,jt as g,ot as _,pt as v,s as y,st as b,t as x,x as S}from"./BA99CCI5.js";import"./xihTtKlq.js";import"./DGo8yE5j.js";var C=c(`<button type="button" role="checkbox"><!></button>`);function w(c,w){a(w,!1);let T=h(),E=h(),D=h(),O=h(),k=h(),A=h(),j=h(),M=h(),N=h(),P=h(),F=h(),I=h(),L=y(w,`checked`,8,!1),R=y(w,`icon`,8),z=y(w,`color`,8,`accent`),B=y(w,`shape`,8,`rounded`),V=y(w,`disabled`,8,!1),H=y(w,`variant`,8,`filled`),U=y(w,`iconColor`,8,``),W=y(w,`stopPropagation`,8,!1),G=y(w,`title`,8,void 0),K=y(w,`compact`,8,!1),q=x(),J={square:`rounded-none`,circle:`rounded-full`,rounded:`rounded-lg`},Y={accent:`border-accent-600 bg-accent-600 hover:brightness-110 dark:border-accent-500 dark:bg-accent-500`,neutral:`border-neutral-900 bg-neutral-900 hover:brightness-110 dark:border-neutral-200 dark:bg-neutral-200`,green:`border-green-600 bg-green-600 hover:brightness-110 dark:border-green-500 dark:bg-green-500`,red:`border-red-600 bg-red-600 hover:brightness-110 dark:border-red-500 dark:bg-red-500`,blue:`border-blue-600 bg-blue-600 hover:brightness-110 dark:border-blue-500 dark:bg-blue-500`},X={accent:`border-accent-600 bg-white hover:bg-neutral-50 dark:border-accent-500 dark:bg-neutral-800/50 dark:hover:bg-neutral-800`,neutral:`border-neutral-400 bg-white hover:bg-neutral-50 dark:border-neutral-600 dark:bg-neutral-800/50 dark:hover:bg-neutral-800`,green:`border-green-600 bg-white hover:bg-neutral-50 dark:border-green-500 dark:bg-neutral-800/50 dark:hover:bg-neutral-800`,red:`border-red-600 bg-white hover:bg-neutral-50 dark:border-red-500 dark:bg-neutral-800/50 dark:hover:bg-neutral-800`,blue:`border-blue-600 bg-white hover:bg-neutral-50 dark:border-blue-500 dark:bg-neutral-800/50 dark:hover:bg-neutral-800`},Z={accent:`text-accent-600 dark:text-accent-400`,neutral:`text-neutral-900 dark:text-neutral-100`,green:`text-green-600 dark:text-green-400`,red:`text-red-600 dark:text-red-400`,blue:`text-blue-600 dark:text-blue-400`};function Q(e){W()&&e.stopPropagation(),q(`click`,e)}f(()=>u(B()),()=>{d(T,J[B()]||J.rounded)}),f(()=>u(z()),()=>{d(E,z().startsWith(`#`)||z().startsWith(`var(`))}),f(()=>u(z()),()=>{d(D,z()===`accent`)}),f(()=>u(K()),()=>{d(O,K()?`h-3.5 w-3.5`:`h-5 w-5`)}),f(()=>u(K()),()=>{d(k,K()?9:14)}),f(()=>(o(E),u(z())),()=>{d(A,o(E)?`accent`:z())}),f(()=>o(A),()=>{d(j,Y[o(A)]??Y.accent)}),f(()=>o(A),()=>{d(M,X[o(A)]??X.accent)}),f(()=>(u(L()),u(H()),o(E),o(j),o(M)),()=>{d(N,L()?H()===`filled`?o(E)?`hover:brightness-110`:o(j):o(E)?`bg-white hover:bg-neutral-50 dark:bg-neutral-800/50 dark:hover:bg-neutral-800`:o(M):`border-2 border-neutral-400 bg-white hover:border-neutral-600 hover:bg-neutral-50 dark:border-neutral-500 dark:bg-neutral-800/50 dark:hover:border-neutral-300 dark:hover:bg-neutral-800`)}),f(()=>(o(E),u(L()),u(z()),u(H())),()=>{d(P,o(E)&&L()?`border-color: ${z()}; ${H()===`filled`?`background-color: ${z()};`:``} ${H()===`outline`?`color: ${z()};`:``}`:``)}),f(()=>(o(E),u(z())),()=>{d(F,o(E)?`text-current`:Z[z()]||Z.accent)}),f(()=>(u(U()),u(H()),o(F)),()=>{d(I,U()||(H()===`filled`?`text-white`:o(F)))}),_(),p();var $=C(),te=m($),ne=e=>{var t=s(),r=v(t);i(r,R,(e,t)=>{t(e,{get size(){return o(k)},get class(){return o(I)}})}),n(e,t)};e(te,e=>{L()&&e(ne)}),r($),b(()=>{S($,`aria-checked`,L()),$.disabled=V(),S($,`title`,G()),ee($,`${o(P)??``}${B()===`circle`?` border-radius: 9999px !important;`:``}`),t($,1,`flex items-center justify-center border transition-colors ${o(O)??``} ${o(T)??``} ${o(N)??``} ${V()?`cursor-not-allowed opacity-50`:`cursor-pointer focus:outline-none`}`)}),l(`click`,$,Q),n(c,$),g()}export{w as t};