import React from 'react';
import PropTypes from 'prop-types';
import { withTranslation } from 'react-i18next';
import { isTrashPage } from '@commons/util/path-utils';
import DevidedPagePath from '@commons/models/devided-page-path';
import LinkedPagePath from '@commons/models/linked-page-path';
import PagePathHierarchicalLink from '@commons/components/PagePathHierarchicalLink';
import { withUnstatedContainers } from '../UnstatedUtils';
import AppContainer from '../../services/AppContainer';
import NavigationContainer from '../../services/NavigationContainer';
import PageContainer from '../../services/PageContainer';
import RevisionPathControls from '../Page/RevisionPathControls';
import TagLabels from '../Page/TagLabels';
import LikeButton from '../LikeButton';
import BookmarkButton from '../BookmarkButton';
import PageCreator from './PageCreator';
import RevisionAuthor from './RevisionAuthor';
import DrawerToggler from './DrawerToggler';
import UserPicture from '../User/UserPicture';
// eslint-disable-next-line react/prop-types
const PagePathNav = ({ pageId, pagePath, isPageForbidden }) => {
const dPagePath = new DevidedPagePath(pagePath, false, true);
let formerLink;
let latterLink;
// when the path is root or first level
if (dPagePath.isRoot || dPagePath.isFormerRoot) {
const linkedPagePath = new LinkedPagePath(pagePath);
latterLink = ;
}
// when the path is second level or deeper
else {
const linkedPagePathFormer = new LinkedPagePath(dPagePath.former);
const linkedPagePathLatter = new LinkedPagePath(dPagePath.latter);
formerLink = ;
latterLink = ;
}
return (