import { Button } from '@/components/ui/button';

interface PaginationProps {
  offset: number;
  limit: number;
  hasMore: boolean;
  onPrev: () => void;
  onNext: () => void;
}

export function Pagination({ offset, limit, hasMore, onPrev, onNext }: PaginationProps) {
  const page = Math.floor(offset / limit) + 1;

  return (
    <div className="flex items-center justify-between border-t border-border bg-muted/30 px-4 py-2">
      <span className="text-[11px] text-muted-foreground">Page {page}</span>
      <div className="flex items-center gap-2">
        <Button size="sm" variant="outline" disabled={offset === 0} onClick={onPrev}>
          Previous
        </Button>
        <Button size="sm" variant="outline" disabled={!hasMore} onClick={onNext}>
          Next
        </Button>
      </div>
    </div>
  );
}
