"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useNavigator = useNavigator;
var _element = require("@wordpress/element");
var _context = require("./context");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

/**
 * Retrieves a `navigator` instance.
 */
function useNavigator() {
  const {
    location,
    params,
    goTo,
    goBack,
    goToParent
  } = (0, _element.useContext)(_context.NavigatorContext);
  return {
    location,
    goTo,
    goBack,
    goToParent,
    params
  };
}
//# sourceMappingURL=use-navigator.js.map