import{A as e,I as t,Q as n,c as r,g as i,l as a,p as o,w as s,x as c,xt as l,yt as u,z as d}from"./vue.runtime.esm-bundler-DS0mm12S.js";import{r as f,t as p}from"./utils-u71wZLxr.js";function m(e){return e?e.flatMap(e=>e.type===a?m(e.children):[e]):[]}var h=c({name:`PrimitiveSlot`,inheritAttrs:!1,setup(t,{attrs:n,slots:i}){return()=>{if(!i.default)return null;let t=m(i.default()),a=t.findIndex(e=>e.type!==r);if(a===-1)return t;let s=t[a];delete s.props?.ref;let c=s.props?e(n,s.props):n,l=o({...s,props:{}},c);return t.length===1?l:(t[a]=l,t)}}}),g=[`area`,`img`,`input`],_=c({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&g.includes(r)?()=>s(r,t):r===`template`?()=>s(h,t,{default:n.default}):()=>s(e.as,t,{default:n.default})}}),v=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,y=f,b=(e,t)=>n=>{if(t?.variants==null)return y(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=v(t)||v(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return y(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},x=c({__name:`Button`,props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:`button`}},setup(e){let r=e;return(a,o)=>(t(),i(u(_),{"data-slot":`button`,as:e.as,"as-child":e.asChild,class:l(u(p)(u(S)({variant:e.variant,size:e.size}),r.class))},{default:n(()=>[d(a.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`]))}}),S=b(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all 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 hover:bg-primary/90`,destructive:`bg-destructive text-white 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 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`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});export{h as a,_ as i,x as n,m as o,b as r,S as t};