import React from 'react' import clsx from 'clsx' import usePagination from './hook' import type { ButtonProps, IPagination, IPaginationProps, PageButtonProps, } from './type' const defaultState: IPagination = { currentPage: 0, setCurrentPage: () => {}, 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 =