import{r as l,j as c,a9 as i,aV as T,aW as x,aX as E,aY as P}from"./index-cc84e56a.js";const y=l.createContext(null),f=y;function d(){return l.useContext(f)}const _=typeof Symbol=="function"&&Symbol.for,g=_?Symbol.for("mui.nested"):"__THEME_NESTED__";function S(e,n){return typeof n=="function"?n(e):i({},e,n)}function C(e){const{children:n,theme:t}=e,o=d(),u=l.useMemo(()=>{const r=o===null?t:S(o,t);return r!=null&&(r[g]=o!==null),r},[t,o]);return c(f.Provider,{value:u,children:n})}const a={};function m(e,n,t,o=!1){return l.useMemo(()=>{const u=e&&n[e]||n;if(typeof t=="function"){const r=t(u),s=e?i({},n,{[e]:r}):r;return o?()=>s:s}return e?i({},n,{[e]:t}):i({},n,t)},[e,n,t,o])}function b(e){const{children:n,theme:t,themeId:o}=e,u=T(a),r=d()||a,s=m(o,u,t),h=m(o,r,t,!0),v=s.direction==="rtl";return c(C,{theme:h,children:c(x.Provider,{value:s,children:c(E,{value:v,children:c(P,{value:s==null?void 0:s.components,children:n})})})})}export{b as T,d as u};
