import{r as s,j as g,R as S,k as V,a as j}from"./index-BOWAPObd.js";function m(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function C(...e){return n=>{let t=!1;const o=e.map(r=>{const i=m(r,n);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():m(e[r],null)}}}}function B(...e){return s.useCallback(C(...e),e)}var R=Symbol.for("react.lazy"),p=S[" use ".trim().toString()];function w(e){return typeof e=="object"&&e!==null&&"then"in e}function k(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===R&&"_payload"in e&&w(e._payload)}function N(e){const n=O(e),t=s.forwardRef((o,r)=>{let{children:i,...u}=o;k(i)&&typeof p=="function"&&(i=p(i._payload));const l=s.Children.toArray(i),f=l.find(A);if(f){const a=f.props.children,d=l.map(c=>c===f?s.Children.count(a)>1?s.Children.only(null):s.isValidElement(a)?a.props.children:null:c);return g.jsx(n,{...u,ref:r,children:s.isValidElement(a)?s.cloneElement(a,void 0,d):null})}return g.jsx(n,{...u,ref:r,children:i})});return t.displayName=`${e}.Slot`,t}var z=N("Slot");function O(e){const n=s.forwardRef((t,o)=>{let{children:r,...i}=t;if(k(r)&&typeof p=="function"&&(r=p(r._payload)),s.isValidElement(r)){const u=T(r),l=$(i,r.props);return r.type!==s.Fragment&&(l.ref=o?C(o,u):u),s.cloneElement(r,l)}return s.Children.count(r)>1?s.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var P=Symbol("radix.slottable");function A(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===P}function $(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 T(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const h=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,x=V,W=(e,n)=>t=>{var o;if(n?.variants==null)return x(e,t?.class,t?.className);const{variants:r,defaultVariants:i}=n,u=Object.keys(r).map(a=>{const d=t?.[a],c=i?.[a];if(d===null)return null;const v=h(d)||h(c);return r[a][v]}),l=t&&Object.entries(t).reduce((a,d)=>{let[c,v]=d;return v===void 0||(a[c]=v),a},{}),f=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((a,d)=>{let{class:c,className:v,..._}=d;return Object.entries(_).every(E=>{let[b,y]=E;return Array.isArray(y)?y.includes({...i,...l}[b]):{...i,...l}[b]===y})?[...a,c,v]:a},[]);return x(e,u,f,t?.class,t?.className)},I=W("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-colors duration-200 outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive dark:bg-destructive/60 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-white hover:bg-red-700 hover:shadow-lg dark:hover:bg-red-500",outline:"bg-background dark:bg-input/30 dark:border-input border shadow-xs hover:bg-gray-100 dark:hover:bg-white/[0.08]",secondary:"bg-secondary text-secondary-foreground dark:bg-secondary hover:bg-gray-300 dark:hover:bg-white/[0.15]",ghost:"hover:bg-gray-100 dark:hover:bg-white/[0.08]",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md 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"}});function D({className:e,variant:n="default",size:t="default",asChild:o=!1,...r}){const i=o?z:"button";return g.jsx(i,{"data-slot":"button","data-variant":n,"data-size":t,className:j(I({variant:n,size:t,className:e})),...r})}export{D as B,N as a,W as b,C as c,B as u};
