import{t as e}from"./jsx-runtime-CiQ1k8xo.js";import{t}from"./clsx-BcPLHiun.js";import{lt as n}from"./vscode-api-DjORcpSo.js";var r=n(),i=e(),a={default:`h-5 w-8`,sm:`h-4 w-7`},o={default:`h-4 w-4 data-[state=unchecked]:translate-x-[2px] data-[state=checked]:translate-x-[14px]`,sm:`h-3 w-3 data-[state=unchecked]:translate-x-[2px] data-[state=checked]:translate-x-[14px]`};function s(e){let n=(0,r.c)(46),s,c,l,u,d,f,p,m,h,g,_;n[0]===e?(s=n[1],c=n[2],l=n[3],u=n[4],d=n[5],f=n[6],p=n[7],m=n[8],h=n[9],g=n[10],_=n[11]):({checked:l,onChange:f,disabled:m,className:u,id:d,ariaLabel:s,size:h,trackClassName:_,thumbClassName:g,onClick:p,...c}=e,n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=u,n[5]=d,n[6]=f,n[7]=p,n[8]=m,n[9]=h,n[10]=g,n[11]=_);let v=m===void 0?!1:m,y=h===void 0?`default`:h,b=a[y],x=o[y],S=l?`checked`:`unchecked`,C;n[12]!==l||n[13]!==v||n[14]!==f?(C=()=>{v||f(!l)},n[12]=l,n[13]=v,n[14]=f,n[15]=C):C=n[15];let w=C,T;n[16]!==w||n[17]!==p?(T=e=>{p?.(e),!e.defaultPrevented&&w()},n[16]=w,n[17]=p,n[18]=T):T=n[18];let E=T,D=v?`cursor-not-allowed opacity-60`:`cursor-interaction`,O;n[19]!==u||n[20]!==D?(O=t(`inline-flex items-center text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-token-focus-border focus-visible:rounded-full`,D,u),n[19]=u,n[20]=D,n[21]=O):O=n[21];let k=l?`bg-token-charts-blue`:`bg-token-foreground/10`,A;n[22]!==k||n[23]!==_||n[24]!==b?(A=t(`relative inline-flex shrink-0 items-center rounded-full transition-colors duration-200 ease-out`,k,b,_),n[22]=k,n[23]=_,n[24]=b,n[25]=A):A=n[25];let j;n[26]!==g||n[27]!==x?(j=t(`rounded-full border border-[color:var(--gray-0)] bg-[color:var(--gray-0)] shadow-sm transition-transform duration-200 ease-out data-[state=unchecked]:translate-x-0`,x,g),n[26]=g,n[27]=x,n[28]=j):j=n[28];let M;n[29]!==S||n[30]!==j?(M=(0,i.jsx)(`span`,{className:j,"data-state":S}),n[29]=S,n[30]=j,n[31]=M):M=n[31];let N;n[32]!==S||n[33]!==M||n[34]!==A?(N=(0,i.jsx)(`span`,{className:A,"data-state":S,children:M}),n[32]=S,n[33]=M,n[34]=A,n[35]=N):N=n[35];let P;return n[36]!==s||n[37]!==c||n[38]!==l||n[39]!==v||n[40]!==E||n[41]!==d||n[42]!==S||n[43]!==N||n[44]!==O?(P=(0,i.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":l,"aria-label":s,id:d,className:O,"data-state":S,...c,onClick:E,disabled:v,children:N}),n[36]=s,n[37]=c,n[38]=l,n[39]=v,n[40]=E,n[41]=d,n[42]=S,n[43]=N,n[44]=O,n[45]=P):P=n[45],P}export{s as t};
//# sourceMappingURL=toggle-Cl52yCxI.js.map