/** * Minimum number of pages required before truncation is applied. */ export declare const TRUNCATION_PAGE_MINIMUM = 5; /** * Default offset value to be used when no offset is provided. */ export declare const DEFAULT_OFFSET = 0; /** * The maximum amount of pages to be displayed initially before applying truncation. * This value is calculated based on the minimum number of pages required for truncation. */ export declare const MAX_INITIAL_PAGES: number; /** * The maximum amount of pages to display towards the end of the pagination (includes the last page). * This ensures that a set number of pages are always visible at the end of the pagination. */ export declare const MAX_END_PAGES = 3; /** * The starting point for rendering pages in the middle part of the pagination control. * This is typically the second page, as the first page is handled separately. */ export declare const MIDPOINT_START = 2; /** * Adjust the total number of pages to account for constant areas like the first page and last page. * This function ensures that the pagination properly considers these fixed areas. * * @param {number} totalPages - The total number of pages available. * @returns {number} Adjusted number of pages after accounting for fixed points. */ export declare const getAdjustedTotalPages: (totalPages: number) => number; /** * Calculate and return the total pages offset based on the offset and the scalar (2). * This determines the number of pages to be displayed before applying truncation. * * @param {number} offset - The base offset for creating the page range. * @returns {number} total offset used in generating the middle page numbers. */ export declare const calculateTotalOffset: (offset: number) => number; /** * Compensate the offset for cases where the total number of pages is low, * ensuring the offset makes sense based on total available pages and thresholds. * * @param {number} totalPages - The total number of pages available. * @param {number} offset - The user-defined offset to adjust. * @returns {number} Adjusted offset value. * @throws Will throw an error if totalPages is less than 1. */ export declare const compensateOffset: (totalPages: number, offset: number) => number; /** * Create a sequential range of page numbers starting from a specific number. * * @param {number} start - The starting page number of the range. * @param {number} length - The number of pages to include in the range. * @returns {number[]} An array of sequential page numbers. */ export declare const createPageRange: (start: number, length: number) => number[]; /** * Generates a range of middle page numbers for pagination, excluding the initial and final pages. * This function handles the middle segment of the pagination and omits the first and last segments * if the current page is near the start or end of the total pages. * * @param {number} totalPages - The total number of pages available. * @param {number} currentPage - The currently active page number. * @param {number} [offset=DEFAULT_OFFSET] - The number of pages to offset on either side of the current page. * @returns {number[]} An array of page numbers representing the middle segment of the pagination. * @throws Will throw an error if the currentPage is less than 1 or greater than totalPages. */ export declare const generateMiddlePages: (totalPages: number, currentPage: number, offset?: number) => number[];