import{d as e,c as s,P as r}from"./CiTEG3KO.js";import{d as a,V as t,y as i,C as n,a3 as o,I as d,J as l}from"./CNYe4-mv.js";const u=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,c=e,v=(e,s)=>r=>{var a;if(null==(null==s?void 0:s.variants))return c(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:t,defaultVariants:i}=s,n=Object.keys(t).map(e=>{const s=null==r?void 0:r[e],a=null==i?void 0:i[e];if(null===s)return null;const n=u(s)||u(a);return t[e][n]}),o=r&&Object.entries(r).reduce((e,s)=>{let[r,a]=s;return void 0===a||(e[r]=a),e},{}),d=null==s||null===(a=s.compoundVariants)||void 0===a?void 0:a.reduce((e,s)=>{let{class:r,className:a,...t}=s;return Object.entries(t).every(e=>{let[s,r]=e;return Array.isArray(r)?r.includes({...i,...o}[s]):{...i,...o}[s]===r})?[...e,r,a]:e},[]);return c(e,n,d,null==r?void 0:r.class,null==r?void 0:r.className)},g=a({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const a=e;return(e,u)=>(i(),t(l(r),{"data-slot":"button",as:e.as,"as-child":e.asChild,class:d(l(s)(l(p)({variant:e.variant,size:e.size}),a.class))},{default:n(()=>[o(e.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),p=v("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});export{g as _,v as c};
