import{u as R,r as i,e as S,j as h,c as j}from"./iframe-B8FSoBNY.js";import{c as k,m as v}from"./factory-DAJZwK4o.js";const M=Object.freeze({}),L=Object.freeze({});function T(s){const{key:t,recipe:o}=s,r=R();return i.useMemo(()=>{const a=o||(t!=null?r.getRecipe(t):{});return r.cva(structuredClone(a))},[t,o,r])}const Y=s=>s.charAt(0).toUpperCase()+s.slice(1);function O(s){const{key:t,recipe:o}=s,r=Y(t||o.className||"Component"),[a,P]=S({strict:!1,name:`${r}PropsContext`,providerName:`${r}PropsContext`});function C(c){const{unstyled:u,...n}=c,e=T({key:t,recipe:n.recipe||o}),[p,m]=i.useMemo(()=>e.splitVariantProps(n),[e,n]);return{styles:u?M:e(p),className:e.className,props:m}}const f=(c,u)=>{const n=k(c,{},u),e=i.forwardRef((p,m)=>{const l=P(),x=i.useMemo(()=>v(l,p),[p,l]),{styles:N,className:d,props:E}=C(x);return h.jsx(n,{...E,ref:m,css:[N,x.css],className:j(d,x.className)})});return e.displayName=c.displayName||c.name,e};function y(){return a}return{withContext:f,PropsProvider:a,withPropsProvider:y,usePropsContext:P,useRecipeResult:C}}export{M as E,L as a,O as c,T as u};
