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