import{b8 as B,b9 as A,ba as G,b7 as l,bb as H,bc as T,bd as J,be as K}from"./index-60a3c753.js";const N=["ownerState"],Q=["variants"],U=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function X(e){return Object.keys(e).length===0}function Y(e){return typeof e=="string"&&e.charCodeAt(0)>96}function O(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 Z=H(),g=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function b({defaultTheme:e,theme:o,themeId:s}){return X(o)?e:o[s]||o}function z(e){return e?(o,s)=>s[e]:null}function x(e,o,s){let{ownerState:a}=o,h=A(o,N);const i=typeof e=="function"?e(l({ownerState:a},h)):e;if(Array.isArray(i))return i.flatMap(u=>x(u,l({ownerState:a},h),s));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:u=[]}=i;let r=A(i,Q);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=Z,rootShouldForwardProp:a=O,slotShouldForwardProp:h=O}=e,i=u=>J(l({},u,{theme:b(l({},u,{defaultTheme:s,themeId:o}))}));return i.__mui_systemSx=!0,(u,R={})=>{B(u,n=>n.filter(m=>!(m!=null&&m.__mui_systemSx)));const{name:r,slot:t,skipVariantsResolver:p,skipSx:f,overridesResolver:F=z(g(t))}=R,E=A(R,U),W=r&&r.startsWith("Mui")||t?"components":"custom",M=p!==void 0?p:t&&t!=="Root"&&t!=="root"||!1,$=f||!1;let D,w=O;t==="Root"||t==="root"?w=a:t?w=h:Y(u)&&(w=void 0);const C=G(u,l({shouldForwardProp:w,label:D},E)),j=n=>typeof n=="function"&&n.__emotion_real!==n||K(n)?m=>{const y=b({theme:m.theme,defaultTheme:s,themeId:o});return x(n,l({},m,{theme:y}),y.modularCssLayers?W:void 0)}:n,k=(n,...m)=>{let y=j(n);const v=m?m.map(j):[];r&&F&&v.push(d=>{const c=b(l({},d,{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,q])=>{_[I]=x(q,l({},d,{theme:c}),c.modularCssLayers?"theme":void 0)}),F(d,_)}),r&&!M&&v.push(d=>{var c;const S=b(l({},d,{defaultTheme:s,themeId:o})),_=S==null||(c=S.components)==null||(c=c[r])==null?void 0:c.variants;return x({variants:_},l({},d,{theme:S}),S.modularCssLayers?"theme":void 0)}),$||v.push(i);const L=v.length-m.length;if(Array.isArray(n)&&L>0){const d=new Array(L).fill("");y=[...n,...d],y.raw=[...n.raw,...d]}const P=C(y,...v);return u.muiName&&(P.muiName=u.muiName),P};return C.withConfig&&(k.withConfig=C.withConfig),k}}export{te as c,O as s};
