import { c as createComponent, d as renderComponent, F as Fragment, r as renderTemplate, b as createAstro, m as maybeRenderHead, a as addAttribute } from './astro/server_DrnzQWw3.mjs'; import 'kleur/colors'; const $$Astro = createAstro(); const $$Pagination = createComponent(($$result, $$props, $$slots) => { const Astro2 = $$result.createAstro($$Astro, $$props, $$slots); Astro2.self = $$Pagination; const { currentPage, totalPages, basePath = "/posts/" } = Astro2.props; const pages = Array.from({ length: totalPages }, (_, index) => index + 1); const getPageHref = (page) => page === 1 ? basePath : `${basePath}?page=${page}`; const previousPage = Math.max(1, currentPage - 1); const nextPage = Math.min(totalPages, currentPage + 1); return renderTemplate`${totalPages > 1 && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${maybeRenderHead()}
صفحه ${currentPage} از ${totalPages}
` })}`}`; }, "/Users/drfelfel/ruseemrooz/src/components/Pagination.astro", void 0); export { $$Pagination as $ };