import React from 'react'; import { Insets } from '@/types/misc'; import { TOCItem } from '@/libs/document'; import { useTranslation } from '@/hooks/useTranslation'; import { useBooknotesNav } from '../../hooks/useBooknotesNav'; import ContentNavBar from './ContentNavBar'; interface BooknotesNavProps { bookKey: string; gridInsets: Insets; toc: TOCItem[]; } const BooknotesNav: React.FC = ({ bookKey, gridInsets, toc }) => { const { activeBooknoteType, currentSection, showBooknotesNav, hasPreviousPage, hasNextPage, handleShowResults, handleClose, handlePrevious, handleNext, } = useBooknotesNav(bookKey, toc); const _ = useTranslation(); if (!showBooknotesNav) { return null; } const getShowResultsTitle = () => { switch (activeBooknoteType) { case 'bookmark': return _('Bookmarks'); case 'annotation': return _('Annotations'); case 'excerpt': return _('Excerpts'); default: return ''; } }; return ( ); }; export default BooknotesNav;