/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
import { cx, getStyles } from "../../../styles/styler.js";
import { useMemo } from "react";
//#region src/components/client/Pagination/paginationStyles.ts
const PAGINATION_CONTROL_HEIGHT = "h-[var(--uds-pagination-control-size)]";
const PAGINATION_PAGE_ITEM_LAYOUT = [
	"inline-grid shrink-0 place-items-center place-content-center rounded-full box-border",
	PAGINATION_CONTROL_HEIGHT,
	"w-[var(--uds-pagination-control-size)]"
].join(" ");
const PAGINATION_PREV_NEXT_LAYOUT = ["inline-grid shrink-0 auto-cols-max grid-flow-col place-items-center place-content-center box-border gap-1", PAGINATION_CONTROL_HEIGHT].join(" ");
function usePaginationRootClassName(size, className) {
	return useMemo(() => cx(getStyles({ paginationSizeRoot: size }), "inline-flex items-center justify-center", className), [size, className]);
}
function usePaginationGapClassName(size) {
	return useMemo(() => cx(getStyles({ paginationSizeRoot: size })), [size]);
}
function usePaginationItemClassName(size, variant, isActive, className) {
	const activeState = isActive ? "on" : "off";
	return useMemo(() => cx(getStyles({ paginationSizeItem: size }), getStyles({
		paginationVariantRoot: variant,
		paginationVariantActiveRoot: activeState
	}), "relative m-0 border-solid", PAGINATION_PAGE_ITEM_LAYOUT, "appearance-none uds-ring cursor-pointer select-none", isActive && "pointer-events-none", className), [
		size,
		variant,
		activeState,
		isActive,
		className
	]);
}
function usePaginationPrevNextClassName(size, variant, className) {
	return useMemo(() => cx(getStyles({ paginationSizeItem: size }), getStyles({
		paginationVariantRoot: variant,
		paginationVariantActiveRoot: "off"
	}), "m-0", PAGINATION_PREV_NEXT_LAYOUT, "border-solid uds-ring cursor-pointer select-none", className), [
		size,
		variant,
		className
	]);
}
function usePaginationIconClassName(size) {
	return useMemo(() => cx(getStyles({ paginationSizeIcon: size })), [size]);
}
function usePaginationEllipsisClassName(size, variant, className) {
	return useMemo(() => cx(getStyles({ paginationSizeItem: size }), getStyles({
		paginationVariantRoot: variant,
		paginationVariantActiveRoot: "off"
	}), "m-0", PAGINATION_PAGE_ITEM_LAYOUT, "pointer-events-none", className), [
		size,
		variant,
		className
	]);
}
const PAGINATION_TEXT_OPTICAL_CENTER = ["block shrink-0 tabular-nums !leading-none", "[text-box-trim:trim-both] [text-box-edge:cap_alphabetic]"].join(" ");
function usePaginationTextClassName(size) {
	return useMemo(() => cx(getStyles({ paginationSizeText: size }), PAGINATION_TEXT_OPTICAL_CENTER), [size]);
}
function usePaginationItemLabelClassName(size) {
	return usePaginationTextClassName(size);
}
//#endregion
export { usePaginationEllipsisClassName, usePaginationGapClassName, usePaginationIconClassName, usePaginationItemClassName, usePaginationItemLabelClassName, usePaginationPrevNextClassName, usePaginationRootClassName, usePaginationTextClassName };
