import{j as d,c as h,a as m}from"./utils.T3xOsTDx.js";import{r as s,a as x}from"./index.DbEQb2qg.js";function g(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function v(...e){return n=>{let r=!1;const o=e.map(t=>{const i=g(t,n);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let t=0;t<o.length;t++){const i=o[t];typeof i=="function"?i():g(e[t],null)}}}}function $(...e){return s.useCallback(v(...e),e)}var C=Symbol.for("react.lazy"),f=x[" use ".trim().toString()];function E(e){return typeof e=="object"&&e!==null&&"then"in e}function y(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===C&&"_payload"in e&&E(e._payload)}function S(e){const n=R(e),r=s.forwardRef((o,t)=>{let{children:i,...l}=o;y(i)&&typeof f=="function"&&(i=f(i._payload));const a=s.Children.toArray(i),u=a.find(k);if(u){const c=u.props.children,b=a.map(p=>p===u?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:p);return d.jsx(n,{...l,ref:t,children:s.isValidElement(c)?s.cloneElement(c,void 0,b):null})}return d.jsx(n,{...l,ref:t,children:i})});return r.displayName=`${e}.Slot`,r}var _=S("Slot");function R(e){const n=s.forwardRef((r,o)=>{let{children:t,...i}=r;if(y(t)&&typeof f=="function"&&(t=f(t._payload)),s.isValidElement(t)){const l=z(t),a=w(i,t.props);return t.type!==s.Fragment&&(a.ref=o?v(o,l):l),s.cloneElement(t,a)}return s.Children.count(t)>1?s.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var j=Symbol("radix.slottable");function k(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j}function w(e,n){const r={...n};for(const o in n){const t=e[o],i=n[o];/^on[A-Z]/.test(o)?t&&i?r[o]=(...a)=>{const u=i(...a);return t(...a),u}:t&&(r[o]=t):o==="style"?r[o]={...t,...i}:o==="className"&&(r[o]=[t,i].filter(Boolean).join(" "))}return{...e,...r}}function z(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const V=m("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md 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-light-blue text-primary-foreground hover:bg-light-blue/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-transparent text-white hover:bg-white hover:text-sand",secondary:"bg-sand text-white hover:bg-sand/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"}});function I({className:e,variant:n="default",size:r="default",asChild:o=!1,...t}){const i=o?_:"button";return d.jsx(i,{"data-slot":"button","data-variant":n,"data-size":r,className:h(V({variant:n,size:r,className:e})),...t})}export{I as B,v as c,$ as u};
