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