import { ChevronLeft, ChevronRight } from 'lucide-react'; type PaginationBarProps = { totalLabel: string; page: number; pageSize: number; totalItems: number; onPageChange: (page: number) => void; onPageSizeChange: (pageSize: number) => void; }; const pageSizeOptions = [10, 20, 50]; export function PaginationBar({ totalLabel, page, pageSize, totalItems, onPageChange, onPageSizeChange }: PaginationBarProps) { const totalPages = Math.max(1, Math.ceil(totalItems / pageSize)); const pages = Array.from({ length: Math.min(totalPages, 5) }, (_, index) => { if (totalPages <= 5) return index + 1; const start = Math.min(Math.max(page - 2, 1), totalPages - 4); return start + index; }); return (
{totalLabel}