import type { ButtonProps, IPagination, IPaginationProps, PageButtonProps, } from './type' import { noop } from 'es-toolkit/function' import * as React from 'react' import { cn } from '@/utils/classnames' import usePagination from './hook' const defaultState: IPagination = { currentPage: 0, setCurrentPage: noop, truncableText: '...', truncableClassName: '', pages: [], hasPreviousPage: false, hasNextPage: false, previousPages: [], isPreviousTruncable: false, middlePages: [], isNextTruncable: false, nextPages: [], } const PaginationContext: React.Context = React.createContext(defaultState) export const PrevButton = ({ className, children, dataTestId, as =