import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react'
import * as React from 'react'
import { ButtonProps, buttonVariants } from '@/components/ui/button'
import { cn } from '@/lib/utils'
const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
className={cn('mx-auto flex w-full justify-center', className)}
Pagination.displayName = 'Pagination'
const PaginationContent = React.forwardRef<
React.ComponentProps<'ul'>
>(({ className, ...props }, ref) => (
className={cn('flex flex-row items-center gap-1', className)}
PaginationContent.displayName = 'PaginationContent'
const PaginationItem = React.forwardRef<
React.ComponentProps<'li'>
>(({ className, ...props }, ref) => (
<li ref={ref} className={cn('', className)} {...props} />
PaginationItem.displayName = 'PaginationItem'
type PaginationLinkProps = {
} & Pick<ButtonProps, 'size'> &
React.ComponentProps<'a'>
const PaginationLink = ({
}: PaginationLinkProps) => (
aria-current={isActive ? 'page' : undefined}
isActive && 'bg-black text-white',
PaginationLink.displayName = 'PaginationLink'
const PaginationPrevious = ({
}: React.ComponentProps<typeof PaginationLink>) => (
aria-label="Go to previous page"
className={cn('gap-1 pl-2.5', className)}
<ChevronLeft className="h-4 w-4" />
PaginationPrevious.displayName = 'PaginationPrevious'
const PaginationNext = ({
}: React.ComponentProps<typeof PaginationLink>) => (
aria-label="Go to next page"
className={cn('gap-1 pr-2.5', className)}
<ChevronRight className="h-4 w-4" />
PaginationNext.displayName = 'PaginationNext'
const PaginationEllipsis = ({
}: React.ComponentProps<'span'>) => (
className={cn('flex h-9 w-9 items-center justify-center', className)}
<MoreHorizontal className="h-4 w-4" />
<span className="sr-only">More pages</span>
PaginationEllipsis.displayName = 'PaginationEllipsis'