import formatErrorMessage from "../../../../utils/esm/formatErrorMessage.js";
import * as React from "react";
const NavigationMenuRootContext = /* @__PURE__ */ React.createContext(void 0);
if (process.env.NODE_ENV !== "production") NavigationMenuRootContext.displayName = "NavigationMenuRootContext";
if (process.env.NODE_ENV !== "production") {
  NavigationMenuRootContext.displayName = "NavigationMenuRootContext";
}
function useNavigationMenuRootContext(optional) {
  const context = React.useContext(NavigationMenuRootContext);
  if (context === void 0 && true) {
    throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: NavigationMenuRootContext is missing. Navigation Menu parts must be placed within <NavigationMenu.Root>." : formatErrorMessage(41));
  }
  return context;
}
const NavigationMenuTreeContext = /* @__PURE__ */ React.createContext(void 0);
if (process.env.NODE_ENV !== "production") NavigationMenuTreeContext.displayName = "NavigationMenuTreeContext";
function useNavigationMenuTreeContext() {
  return React.useContext(NavigationMenuTreeContext);
}
export {
  NavigationMenuRootContext,
  NavigationMenuTreeContext,
  useNavigationMenuRootContext,
  useNavigationMenuTreeContext
};
//# sourceMappingURL=NavigationMenuRootContext.js.map
