import{r as _,a9 as s,a7 as g,ae as j}from"./index-57016b76.js";const T=_.createContext(void 0),W=e=>{const n=_.useContext(T);return{getColor:(o,t)=>n&&e&&n.includes(e)?o||"context":o||t}};function L(e){return typeof e=="string"}function Z(e,n,o){return e===void 0||L(e)?n:s({},n,{ownerState:s({},n.ownerState,o)})}function q(e,n=[]){if(e===void 0)return{};const o={};return Object.keys(e).filter(t=>t.match(/^on[A-Z]/)&&typeof e[t]=="function"&&!n.includes(t)).forEach(t=>{o[t]=e[t]}),o}function z(e,n,o){return typeof e=="function"?e(n,o):e}function b(e){var n,o,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(o=b(e[n]))&&(t&&(t+=" "),t+=o);else for(n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function E(){for(var e,n,o=0,t="";o<arguments.length;)(e=arguments[o++])&&(n=b(e))&&(t&&(t+=" "),t+=n);return t}function F(e){if(e===void 0)return{};const n={};return Object.keys(e).filter(o=>!(o.match(/^on[A-Z]/)&&typeof e[o]=="function")).forEach(o=>{n[o]=e[o]}),n}function B(e){const{getSlotProps:n,additionalProps:o,externalSlotProps:t,externalForwardedProps:r,className:u}=e;if(!n){const f=E(r==null?void 0:r.className,t==null?void 0:t.className,u,o==null?void 0:o.className),i=s({},o==null?void 0:o.style,r==null?void 0:r.style,t==null?void 0:t.style),c=s({},o,r,t);return f.length>0&&(c.className=f),Object.keys(i).length>0&&(c.style=i),{props:c,internalRef:void 0}}const v=q(s({},r,t)),y=F(t),x=F(r),l=n(v),a=E(l==null?void 0:l.className,o==null?void 0:o.className,u,r==null?void 0:r.className,t==null?void 0:t.className),m=s({},l==null?void 0:l.style,o==null?void 0:o.style,r==null?void 0:r.style,t==null?void 0:t.style),d=s({},l,o,x,y);return a.length>0&&(d.className=a),Object.keys(m).length>0&&(d.style=m),{props:d,internalRef:l.ref}}const D=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],G=["component","slots","slotProps"],J=["component"],K=["disableColorInversion"];function Q(e,n){const{className:o,elementType:t,ownerState:r,externalForwardedProps:u,getSlotOwnerState:v,internalForwardedProps:y}=n,x=g(n,D),{component:l,slots:a={[e]:void 0},slotProps:m={[e]:void 0}}=u,d=g(u,G),f=a[e]||t,i=z(m[e],r),c=B(s({className:o},x,{externalForwardedProps:e==="root"?d:void 0,externalSlotProps:i})),{props:{component:P},internalRef:k}=c,S=g(c.props,J),H=j(k,i==null?void 0:i.ref,n.ref),C=v?v(S):{},{disableColorInversion:A=!1}=C,w=g(C,K),p=s({},r,w),{getColor:I}=W(p.variant);if(e==="root"){var h;p.color=(h=S.color)!=null?h:r.color}else A||(p.color=I(S.color,p.color));const N=e==="root"?P||l:P,O=Z(f,s({},e==="root"&&!l&&!a[e]&&y,e!=="root"&&!a[e]&&y,S,N&&{as:N},{ref:H}),p);return Object.keys(w).forEach(R=>{delete O[R]}),[f,O]}export{T as C,W as a,Z as b,E as c,q as e,B as m,z as r,Q as u};
