"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useNavigationContext = exports.NavigationContext = void 0;
var _element = require("@wordpress/element");
var _constants = require("./constants");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const noop = () => {};
const defaultIsEmpty = () => false;
const defaultGetter = () => undefined;
const NavigationContext = exports.NavigationContext = (0, _element.createContext)({
  activeItem: undefined,
  activeMenu: _constants.ROOT_MENU,
  setActiveMenu: noop,
  navigationTree: {
    items: {},
    getItem: defaultGetter,
    addItem: noop,
    removeItem: noop,
    menus: {},
    getMenu: defaultGetter,
    addMenu: noop,
    removeMenu: noop,
    childMenu: {},
    traverseMenu: noop,
    isMenuEmpty: defaultIsEmpty
  }
});
const useNavigationContext = () => (0, _element.useContext)(NavigationContext);
exports.useNavigationContext = useNavigationContext;
//# sourceMappingURL=context.js.map