import{s as l}from"./chunk-LvLJmgfZ.js";import{t as v}from"./react-Bj1aDYRI.js";import{t as h}from"./compiler-runtime-B3qBwwSJ.js";import{t as x}from"./jsx-runtime-CP2fAiZX.js";import{n as y,t as f}from"./cn-d_A4rA-x.js";import{S as N,_ as w,w as z}from"./Combination-tjZP3FH6.js";var u=l(v(),1),m=l(x(),1),p="Toggle",g=u.forwardRef((a,n)=>{let{pressed:e,defaultPressed:r,onPressedChange:s,...o}=a,[t,i]=N({prop:e,onChange:s,defaultProp:r??!1,caller:p});return(0,m.jsx)(w.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...o,ref:n,onClick:z(a.onClick,()=>{a.disabled||i(!t)})})});g.displayName=p;var b=g,C=h(),j=y(f("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","data-[state=on]:bg-muted data-[state=on]:text-muted-foreground"),{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted hover:text-muted-foreground"},size:{default:"h-9 px-3",xs:"h-4 w-4",sm:"h-6 px-2",lg:"h-10 px-5"}},defaultVariants:{variant:"default",size:"default"}}),c=u.forwardRef((a,n)=>{let e=(0,C.c)(13),r,s,o,t;e[0]===a?(r=e[1],s=e[2],o=e[3],t=e[4]):({className:r,variant:t,size:o,...s}=a,e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=t);let i;e[5]!==r||e[6]!==o||e[7]!==t?(i=f(j({variant:t,size:o,className:r})),e[5]=r,e[6]=o,e[7]=t,e[8]=i):i=e[8];let d;return e[9]!==s||e[10]!==n||e[11]!==i?(d=(0,m.jsx)(b,{ref:n,className:i,...s}),e[9]=s,e[10]=n,e[11]=i,e[12]=d):d=e[12],d});c.displayName=b.displayName;export{c as t};
