import n from "../../../../../../../@base-ui_utils@0.2.4_@types_react@18.3.27_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/formatErrorMessage.js";
import * as t from "react";
const e = /* @__PURE__ */ t.createContext(void 0);
process.env.NODE_ENV !== "production" && (e.displayName = "CompositeRootContext");
function r(s = !1) {
  const o = t.useContext(e);
  if (o === void 0 && !s)
    throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : n(16));
  return o;
}
export {
  e as CompositeRootContext,
  r as useCompositeRootContext
};
