"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
const react = require("@emotion/react");
const EmotionCacheContext = React.createContext(null);
function useEmotionCache() {
  const cache = React.useContext(EmotionCacheContext);
  if (cache === null) {
    throw new Error(
      "Emotion cache is not available in context, make sure that you have MantineEmotionProvider in the component tree"
    );
  }
  return cache;
}
const MantineEmotionProvider = react.withEmotionCache(
  ({ children, cache }, ctx) => /* @__PURE__ */ jsxRuntime.jsx(EmotionCacheContext.Provider, { value: cache || ctx, children })
);
exports.EmotionCacheContext = EmotionCacheContext;
exports.MantineEmotionProvider = MantineEmotionProvider;
exports.useEmotionCache = useEmotionCache;
