export type PageArrayItem = { type: "page"; page: number; } | { type: "overflow"; startPage: number; endPage: number; length: number; }; /** * Custom hook for managing pagination array state and generation. * * Features: * - Automatically generates pagination array based on current page and total pages * - Avoids unnecessary regeneration if the current page is already visible * - Updates array when page or total pages change and the visible set must change * - Handles jumps to first/last page with overflow between current and target * - Provides stable reference for the current pagination array * * @param page The currently selected page * @param totalPages Total number of pages * @param maxArrayLength Maximum length of the pagination array (including overflows) * @returns The current pagination array * * @example * const pageArray = usePaginationArray({ * page: 5, * totalPages: 10, * maxArrayLength: 7 * }); */ export declare const usePaginationArray: ({ page, totalPages, maxArrayLength, }: { page: number; totalPages: number; maxArrayLength?: number; }) => PageArrayItem[];