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

/**
 * Internal dependencies
 */
import { NAVIGATION_POST_TYPE } from '../../utils/constants';
import Editor from '../editor';
import SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';
import { unlock } from '../../lock-unlock';
import { jsx as _jsx } from "react/jsx-runtime";
const {
  useLocation
} = unlock(routerPrivateApis);
function MobileNavigationItemView() {
  const {
    query = {}
  } = useLocation();
  const {
    canvas = 'view'
  } = query;
  return canvas === 'edit' ? /*#__PURE__*/_jsx(Editor, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenu, {
    backPath: {
      postType: NAVIGATION_POST_TYPE
    }
  });
}
export const navigationItemRoute = {
  name: 'navigation-item',
  path: '/wp_navigation/:postId',
  areas: {
    sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenu, {
      backPath: "/navigation"
    }),
    preview: /*#__PURE__*/_jsx(Editor, {}),
    mobile: /*#__PURE__*/_jsx(MobileNavigationItemView, {})
  }
};
//# sourceMappingURL=navigation-item.js.map