/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../_virtual/_rolldown/runtime.cjs");
const require_components_client_Pagination_paginationContext = require("./paginationContext.cjs");
const require_components_client_Pagination_paginationStyles = require("./paginationStyles.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/client/Pagination/Pagination.tsx
/**
* **Pagination — numbered page navigation component**
*
* @componentType Client component
*
* @description Compose with `PaginationPrev`, `PaginationNumbers`, and `PaginationNext`.
* The consumer owns `activePage` state.
*
* @example
* ```tsx
* <Pagination activePage={page} totalPages={10} onPageChange={setPage} aria-label="Results">
*   <PaginationPrev />
*   <PaginationNumbers />
*   <PaginationNext />
* </Pagination>
* ```
*/
const Pagination = (0, react.forwardRef)(function Pagination({ activePage, totalPages, maxVisiblePageNumbers = 7, ellipsisPlacement = "default", size = "md", variant = "default", getPageHref, getItemAriaLabel = require_components_client_Pagination_paginationContext.defaultGetItemAriaLabel, onPageChange, children, className, "aria-label": ariaLabel = "Pagination", ...rest }, ref) {
	const rootClass = require_components_client_Pagination_paginationStyles.usePaginationRootClassName(size, className);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Pagination_paginationContext.PaginationProvider, {
		value: (0, react.useMemo)(() => ({
			activePage,
			totalPages,
			maxVisiblePageNumbers,
			ellipsisPlacement,
			size,
			variant,
			getPageHref,
			getItemAriaLabel,
			onPageChange
		}), [
			activePage,
			totalPages,
			maxVisiblePageNumbers,
			ellipsisPlacement,
			size,
			variant,
			getPageHref,
			getItemAriaLabel,
			onPageChange
		]),
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
			ref,
			"aria-label": ariaLabel,
			className: rootClass,
			...rest,
			children
		})
	});
});
Pagination.displayName = "Pagination";
//#endregion
exports.Pagination = Pagination;
