"use strict";

import { createContext, useContext } from 'react';
export const MenuContext = /*#__PURE__*/createContext(null);
MenuContext.displayName = 'BloomMenuContext';
export const ItemContext = /*#__PURE__*/createContext(null);
ItemContext.displayName = 'BloomMenuItemContext';
export function useMenuContext() {
  const context = useContext(MenuContext);
  if (!context) {
    throw new Error('useMenuContext must be used within a Menu.Root');
  }
  return context;
}
export function useMenuItemContext() {
  const context = useContext(ItemContext);
  if (!context) {
    throw new Error('useMenuItemContext must be used within a Menu.Item');
  }
  return context;
}
//# sourceMappingURL=context.js.map