export type PaginationItem = | { type: 'page'; page: number; selected?: boolean; } | { type: 'ellipsis'; }; export type PaginationOptions = { /** React state for the currently active page. */ activePage: number; /** Total number of pages. */ totalPages: number; /** Callback that is fired when the active page changes. Use this callback to update the `activePage` state. */ onChange: (activePage: number) => void; /** Number of pages to show on each side of current page. */ siblingCount?: number; /** Number of pages to show at the beginning and end of pagination. */ boundaryCount?: number; }; export type PaginationApi = Omit & { /** React state for the currently active page number. Setting it to `null` results in no active page. */ activePage: number; /** Update the currently active page number to `activePage`. Setting it to a number outside of the valid range will not change the active page. */ updateActivePage: (activePage: number) => void; /** Update the currently active page to the next page. */ goNextPage: () => void; /** Update the currently active page to the previous page. */ goPrevPage: () => void; /** Update the currently active page to the first page. */ goFirstPage: () => void; /** Update the currently active page to the last page. */ goLastPage: () => void; /** State indicating if the activePage is the first page. */ isFirstPage: boolean; /** State indicating if the activePage is the last page. */ isLastPage: boolean; /** Array of pagination items. */ items: PaginationItem[]; }; export declare function usePagination({ activePage, onChange, totalPages, siblingCount, boundaryCount, }: PaginationOptions): PaginationApi; //# sourceMappingURL=usePagination.d.ts.map