import{s as l}from"./chunk-DZLz74EQ.js";import{t as v}from"./react-BcIddLXZ.js";import{n as h,t as x}from"./jsx-runtime-DvsdsEjx.js";import{n as y,t as f}from"./cn-C5VTNYKf.js";import{b as N,h as z,v as C}from"./Combination-DR4iFoRS.js";var u=l(v(),1),m=l(x(),1),p="Toggle",b=u.forwardRef((a,n)=>{let{pressed:e,defaultPressed:r,onPressedChange:s,...o}=a,[t,i]=C({prop:e,onChange:s,defaultProp:r??!1,caller:p});return(0,m.jsx)(z.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...o,ref:n,onClick:N(a.onClick,()=>{a.disabled||i(!t)})})});b.displayName=p;var g=b,j=l(h(),1),k=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,j.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(k({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)(g,{ref:n,className:i,...s}),e[9]=s,e[10]=n,e[11]=i,e[12]=d):d=e[12],d});c.displayName=g.displayName;export{c as t};
