import e from"../../../../@babel/runtime/helpers/esm/extends.js";import s from"../../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import t from"react";import r from"../../../../prop-types/index.js";import{create as o}from"../../../../jss/dist/jss.esm.js";import n from"../jssPreset/jssPreset.js";import i from"../createGenerateClassName/createGenerateClassName.js";import a from"../../../utils/esm/exactProp.js";var p,c=o(n()),l=i(),d=new Map,m={disableGeneration:!1,generateClassName:l,jss:c,sheetsCache:null,sheetsManager:d,sheetsRegistry:null},u=t.createContext(m);function j(r){var i=r.children,a=r.injectFirst,c=void 0!==a&&a,l=r.disableGeneration,d=void 0!==l&&l,m=s(r,["children","injectFirst","disableGeneration"]),j=t.useContext(u),h=e({},j,{disableGeneration:d},m);if("production"!==process.env.NODE_ENV&&("undefined"!=typeof window||h.sheetsManager||console.error("Material-UI: You need to use the ServerStyleSheets API when rendering on the server.")),"production"!==process.env.NODE_ENV&&h.jss.options.insertionPoint&&c&&console.error("Material-UI: You cannot use a custom insertionPoint and <StylesContext injectFirst> at the same time."),"production"!==process.env.NODE_ENV&&c&&m.jss&&console.error("Material-UI: You cannot use the jss and injectFirst props at the same time."),!h.jss.options.insertionPoint&&c&&"undefined"!=typeof window){if(!p){var f=document.head;p=document.createComment("mui-inject-first"),f.insertBefore(p,f.firstChild)}h.jss=o({plugins:n().plugins,insertionPoint:p})}return t.createElement(u.Provider,{value:h},i)}"production"!==process.env.NODE_ENV&&(u.displayName="StylesContext"),"production"!==process.env.NODE_ENV&&(j.propTypes={children:r.node.isRequired,disableGeneration:r.bool,generateClassName:r.func,injectFirst:r.bool,jss:r.object,serverGenerateClassName:r.func,sheetsCache:r.object,sheetsManager:r.object,sheetsRegistry:r.object}),"production"!==process.env.NODE_ENV&&"production"!==process.env.NODE_ENV&&(j.propTypes=a(j.propTypes));export default j;export{u as StylesContext,d as sheetsManager};
//# sourceMappingURL=StylesProvider.js.map
