//#region lib/ui/Pagination.helper.ts
var e = 7, t = 3, n = 1, r = 2, i = (e, i, a) => a <= t ? !1 : e === n ? i > n + r : e === a ? i < a - r : !1, a = (e, t) => t.findIndex((t) => t.type === "pageNumber" && t.value === e), o = (t, n) => {
	let r = [];
	r.push({
		type: "previousButton",
		disabled: n <= 1 || t <= 1
	});
	for (let i = 1; i <= n; i++) n <= e || i <= 2 || i < 3 && t < 5 || i >= n - 1 || Math.abs(i - t) <= 1 ? r.push({
		type: "pageNumber",
		value: i
	}) : r[r.length - 1].type !== "ellipsis" && r.push({ type: "ellipsis" });
	return r.push({
		type: "nextButton",
		disabled: n <= 1 || t >= n
	}), r;
}, s = (e, r, i) => {
	if (i <= t || e === n || e === r || e === i) return !1;
	let a = e === n + 1, o = e === i - 1, s = e === r - 1, c = e === r + 1;
	return a && r === n || o && r === i || a && s ? !1 : !(c && o);
};
//#endregion
export { o as generatePagination, a as getActivePageIndex, s as hidePageButtonForMobile, i as showMobileEllipsis };

//# sourceMappingURL=Pagination.helper.js.map