'use client' import { Button } from '@/components/ui/button' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select' import { ChevronLeft, ChevronRight } from 'lucide-react' interface PaginationProps { page: number totalPages: number total: number perPage: number onPageChange: (page: number) => void onPerPageChange?: (perPage: number) => void } export function Pagination({ page, totalPages, total, perPage, onPageChange, onPerPageChange, }: PaginationProps) { if (totalPages <= 1 && !onPerPageChange) return null const from = (page - 1) * perPage + 1 const to = Math.min(page * perPage, total) return (

Showing {from} to {to} of {total} results

{onPerPageChange && ( )}
{totalPages > 1 && (
Page {page} of {totalPages}
)}
) }