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