--- import { libraryPageRoute, type LibraryPageSlice } from '../utils/library-pagination'; import type { LibraryLocale } from '../utils/library-catalog'; import { authorPageRoute } from '../utils/author-archives'; interface Props { locale: LibraryLocale; page: LibraryPageSlice; authorRoot?: string; } const { locale, page, authorRoot } = Astro.props; const pageRoute = (number: number) => authorRoot ? authorPageRoute(authorRoot, number) : libraryPageRoute(locale, number); const messages = { en: { navigation: 'Library pagination', previous: 'Previous', next: 'Next', page: 'Page', current: 'current page' }, es: { navigation: 'Paginación de la biblioteca', previous: 'Anterior', next: 'Siguiente', page: 'Página', current: 'página actual' }, ar: { navigation: 'ترقيم صفحات المكتبة', previous: 'السابق', next: 'التالي', page: 'الصفحة', current: 'الصفحة الحالية' } }[locale]; const pages = Array.from({ length: page.totalPages }, (_, index) => index + 1); --- {page.totalPages > 1 && ( )}