/** * A hook to coordinate with paginated content. * @param totalPages - The total number of pages */ declare function usePagination(totalPages?: number): [ /** * Absolute count of the page (regardless of the `totalPages` count). */ page: number, /** * Takes into account the `totalPages` to wrap the page count in [1, totalPages]. */ relativePage: number, /** * A positive direction indicates that the last triggerd action was nextPage, likewise * a negative direction indicates movement to the previous page. */ direction: number, /** * A flag that indicates if the next page exists. */ hasNext: boolean, /** * A flag to indicate if previous page exists. */ hasPrevious: boolean, /** * Update the absolute and relative page counts, and direction in the backward direction. */ previousPage: () => void, /** * Update the absolute and relative page counts, and direction in the forward direction. */ nextPage: () => void ]; export default usePagination;