/**
 * WordPress dependencies
 */
import { privateApis as routerPrivateApis } from '@wordpress/router';

/**
 * Internal dependencies
 */
import Editor from '../editor';
import SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';
import { unlock } from '../../lock-unlock';
import { jsx as _jsx } from "react/jsx-runtime";
const {
  useLocation
} = unlock(routerPrivateApis);
function MobileNavigationView() {
  const {
    query = {}
  } = useLocation();
  const {
    canvas = 'view'
  } = query;
  return canvas === 'edit' ? /*#__PURE__*/_jsx(Editor, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenus, {
    backPath: "/"
  });
}
export const navigationRoute = {
  name: 'navigation',
  path: '/navigation',
  areas: {
    sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenus, {
      backPath: "/"
    }),
    preview: /*#__PURE__*/_jsx(Editor, {}),
    mobile: /*#__PURE__*/_jsx(MobileNavigationView, {})
  }
};
//# sourceMappingURL=navigation.js.map