/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_components_client_Pagination_ellipsisDefault = require("./ellipsisDefault.cjs");
const require_components_client_Pagination_ellipsisNone = require("./ellipsisNone.cjs");
//#region src/components/client/Pagination/computeVisiblePages.ts
const MIN_MAX_VISIBLE_WITH_ELLIPSIS = 3;
function computeVisiblePages({ activePage, totalPages, maxVisiblePageNumbers, ellipsisPlacement }) {
	const max = ellipsisPlacement === "none" ? Math.max(1, maxVisiblePageNumbers) : Math.max(MIN_MAX_VISIBLE_WITH_ELLIPSIS, maxVisiblePageNumbers);
	if (totalPages <= 0) return [];
	if (typeof ellipsisPlacement === "function") return ellipsisPlacement({
		activePage,
		totalPages,
		maxVisiblePageNumbers: max
	});
	switch (ellipsisPlacement) {
		case "none": return require_components_client_Pagination_ellipsisNone.ellipsisNone(activePage, totalPages, max);
		default: return require_components_client_Pagination_ellipsisDefault.ellipsisDefault(activePage, totalPages, max);
	}
}
//#endregion
exports.computeVisiblePages = computeVisiblePages;
