import{cY as Y,cZ as F,c_ as Z,cX as l,c$ as q,d0 as T,d1 as B,d2 as G}from"./index-60657852.js";const H=["ownerState"],J=["variants"],K=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function N(e){return Object.keys(e).length===0}function Q(e){return typeof e=="string"&&e.charCodeAt(0)>96}function A(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function V(e,o){return o&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${o}{${String(e.styles)}}`),e}const U=q(),g=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function x({defaultTheme:e,theme:o,themeId:s}){return N(o)?e:o[s]||o}function z(e){return e?(o,s)=>s[e]:null}function R(e,o,s){let{ownerState:a}=o,h=F(o,H);const i=typeof e=="function"?e(l({ownerState:a},h)):e;if(Array.isArray(i))return i.flatMap(u=>R(u,l({ownerState:a},h),s));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:u=[]}=i;let r=F(i,J);return u.forEach(t=>{let p=!0;if(typeof t.props=="function"?p=t.props(l({ownerState:a},h,a)):Object.keys(t.props).forEach(f=>{(a==null?void 0:a[f])!==t.props[f]&&h[f]!==t.props[f]&&(p=!1)}),p){Array.isArray(r)||(r=[r]);const f=typeof t.style=="function"?t.style(l({ownerState:a},h,a)):t.style;r.push(s?V(T(f),s):f)}}),r}return s?V(T(i),s):i}function te(e={}){const{themeId:o,defaultTheme:s=U,rootShouldForwardProp:a=A,slotShouldForwardProp:h=A}=e,i=u=>B(l({},u,{theme:x(l({},u,{defaultTheme:s,themeId:o}))}));return i.__mui_systemSx=!0,(u,C={})=>{Y(u,n=>n.filter(d=>!(d!=null&&d.__mui_systemSx)));const{name:r,slot:t,skipVariantsResolver:p,skipSx:f,overridesResolver:j=z(g(t))}=C,E=F(C,K),W=r&&r.startsWith("Mui")||t?"components":"custom",$=p!==void 0?p:t&&t!=="Root"&&t!=="root"||!1,M=f||!1;let D,w=A;t==="Root"||t==="root"?w=a:t?w=h:Q(u)&&(w=void 0);const O=Z(u,l({shouldForwardProp:w,label:D},E)),k=n=>typeof n=="function"&&n.__emotion_real!==n||G(n)?d=>{const y=x({theme:d.theme,defaultTheme:s,themeId:o});return R(n,l({},d,{theme:y}),y.modularCssLayers?W:void 0)}:n,L=(n,...d)=>{let y=k(n);const v=d?d.map(k):[];r&&j&&v.push(m=>{const c=x(l({},m,{defaultTheme:s,themeId:o}));if(!c.components||!c.components[r]||!c.components[r].styleOverrides)return null;const S=c.components[r].styleOverrides,_={};return Object.entries(S).forEach(([I,X])=>{_[I]=R(X,l({},m,{theme:c}),c.modularCssLayers?"theme":void 0)}),j(m,_)}),r&&!$&&v.push(m=>{var c;const S=x(l({},m,{defaultTheme:s,themeId:o})),_=S==null||(c=S.components)==null||(c=c[r])==null?void 0:c.variants;return R({variants:_},l({},m,{theme:S}),S.modularCssLayers?"theme":void 0)}),M||v.push(i);const P=v.length-d.length;if(Array.isArray(n)&&P>0){const m=new Array(P).fill("");y=[...n,...m],y.raw=[...n.raw,...m]}const b=O(y,...v);return u.muiName&&(b.muiName=u.muiName),b};return O.withConfig&&(L.withConfig=O.withConfig),L}}export{te as c,A as s};
