import{b as a,t as _,j as m}from"./app-CyJEXGyv.js";import{c as E,b as V,a as j}from"./utils-D3rN0LeJ.js";var w=Symbol.for("react.lazy"),p=_[" use ".trim().toString()];function N(e){return typeof e=="object"&&e!==null&&"then"in e}function x(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===w&&"_payload"in e&&N(e._payload)}function R(e){const n=O(e),t=a.forwardRef((o,r)=>{let{children:i,...d}=o;x(i)&&typeof p=="function"&&(i=p(i._payload));const l=a.Children.toArray(i),f=l.find(A);if(f){const s=f.props.children,u=l.map(c=>c===f?a.Children.count(s)>1?a.Children.only(null):a.isValidElement(s)?s.props.children:null:c);return m.jsx(n,{...d,ref:r,children:a.isValidElement(s)?a.cloneElement(s,void 0,u):null})}return m.jsx(n,{...d,ref:r,children:i})});return t.displayName=`${e}.Slot`,t}var k=R("Slot");function O(e){const n=a.forwardRef((t,o)=>{let{children:r,...i}=t;if(x(r)&&typeof p=="function"&&(r=p(r._payload)),a.isValidElement(r)){const d=$(r),l=z(i,r.props);return r.type!==a.Fragment&&(l.ref=o?E(o,d):d),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var P=Symbol("radix.slottable");function A(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===P}function z(e,n){const t={...n};for(const o in n){const r=e[o],i=n[o];/^on[A-Z]/.test(o)?r&&i?t[o]=(...l)=>{const f=i(...l);return r(...l),f}:r&&(t[o]=r):o==="style"?t[o]={...r,...i}:o==="className"&&(t[o]=[r,i].filter(Boolean).join(" "))}return{...e,...t}}function $(e){var o,r;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const b=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,h=V,T=(e,n)=>t=>{var o;if((n==null?void 0:n.variants)==null)return h(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:r,defaultVariants:i}=n,d=Object.keys(r).map(s=>{const u=t==null?void 0:t[s],c=i==null?void 0:i[s];if(u===null)return null;const v=b(u)||b(c);return r[s][v]}),l=t&&Object.entries(t).reduce((s,u)=>{let[c,v]=u;return v===void 0||(s[c]=v),s},{}),f=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((s,u)=>{let{class:c,className:v,...C}=u;return Object.entries(C).every(S=>{let[g,y]=S;return Array.isArray(y)?y.includes({...i,...l}[g]):{...i,...l}[g]===y})?[...s,c,v]:s},[]);return h(e,d,f,t==null?void 0:t.class,t==null?void 0:t.className)},W=T("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_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",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs 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 has-[>svg]:px-3",sm:"h-8 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9",input:"px-3 py-2 h-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function B({className:e,variant:n,size:t,asChild:o=!1,...r}){const i=o?k:"button";return m.jsx(i,{"data-slot":"button",className:j(W({variant:n,size:t,className:e})),...r})}export{B,k as S,R as a,W as b,T as c};
