import{r as x,j as V}from"./app-C7YxHmQz.js";import{S as w}from"./index-Cp62Blk_.js";import{a as N,c as j}from"./utils-DjqsqOe8.js";const f=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,b=N,k=(n,r)=>e=>{var i;if((r==null?void 0:r.variants)==null)return b(n,e==null?void 0:e.class,e==null?void 0:e.className);const{variants:l,defaultVariants:o}=r,u=Object.keys(l).map(t=>{const a=e==null?void 0:e[t],d=o==null?void 0:o[t];if(a===null)return null;const s=f(a)||f(d);return l[t][s]}),v=e&&Object.entries(e).reduce((t,a)=>{let[d,s]=a;return s===void 0||(t[d]=s),t},{}),g=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((t,a)=>{let{class:d,className:s,...y}=a;return Object.entries(y).every(h=>{let[m,c]=h;return Array.isArray(c)?c.includes({...o,...v}[m]):{...o,...v}[m]===c})?[...t,d,s]:t},[]);return b(n,u,g,e==null?void 0:e.class,e==null?void 0:e.className)},C=k("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_=x.forwardRef(({className:n,variant:r,size:e,asChild:i=!1,...l},o)=>{const u=i?w:"button";return V.jsx(u,{className:j(C({variant:r,size:e,className:n})),ref:o,...l})});_.displayName="Button";export{_ as B,C as b,k as c};
