import Link from "next/link"; import { t, type Locale } from "@/lib/i18n"; export function Pagination({ locale, page, total, perPage, base, params }: { locale: Locale; page: number; total: number; perPage: number; base: string; params: URLSearchParams }) { const d = t(locale); const pages = Math.max(1, Math.ceil(total / perPage)); if (pages <= 1) return null; const link = (p: number) => { const q = new URLSearchParams(params.toString()); q.set("page", String(p)); return `${base}?${q.toString()}`; }; return ( ); }