/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
//#region src/components/client/Pagination/ellipsisNone.ts
function range(start, end) {
	const result = [];
	for (let i = start; i <= end; i++) result.push(i);
	return result;
}
/**
* Contiguous window around activePage only; never renders ellipses.
*/
function ellipsisNone(activePage, totalPages, maxVisiblePageNumbers) {
	if (totalPages <= maxVisiblePageNumbers) return range(1, totalPages);
	const windowSize = maxVisiblePageNumbers;
	let start = activePage - Math.floor((windowSize - 1) / 2);
	let end = start + windowSize - 1;
	if (start < 1) {
		start = 1;
		end = windowSize;
	}
	if (end > totalPages) {
		end = totalPages;
		start = totalPages - windowSize + 1;
	}
	return range(start, end);
}
//#endregion
export { ellipsisNone };
