import { createContext, useContext } from "react";
const MantineContext = createContext(null);
function useMantineContext() {
  const ctx = useContext(MantineContext);
  if (!ctx) {
    throw new Error("[@mantine/core] MantineProvider was not found in tree");
  }
  return ctx;
}
function useMantineCssVariablesResolver() {
  return useMantineContext().cssVariablesResolver;
}
function useMantineClassNamesPrefix() {
  return useMantineContext().classNamesPrefix;
}
function useMantineStyleNonce() {
  return useMantineContext().getStyleNonce;
}
function useMantineWithStaticClasses() {
  return useMantineContext().withStaticClasses;
}
function useMantineIsHeadless() {
  return useMantineContext().headless;
}
function useMantineSxTransform() {
  var _a;
  return (_a = useMantineContext().stylesTransform) == null ? void 0 : _a.sx;
}
function useMantineStylesTransform() {
  var _a;
  return (_a = useMantineContext().stylesTransform) == null ? void 0 : _a.styles;
}
export {
  MantineContext,
  useMantineClassNamesPrefix,
  useMantineContext,
  useMantineCssVariablesResolver,
  useMantineIsHeadless,
  useMantineStyleNonce,
  useMantineStylesTransform,
  useMantineSxTransform,
  useMantineWithStaticClasses
};
