import { CSSProperties } from 'react'; import { IconContent } from '../types/icon.types.js'; import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js'; export type PaginationSlots = 'root' | 'item' | 'control' | 'ellipsis'; /** Text Pagination renders of its own, for translating it. */ export interface PaginationLabels { /** One page button, given its number. */ goToPage?: (page: number) => string; /** Jump to the first page. */ first?: string; /** Step back one page. */ previous?: string; /** Step forward one page. */ next?: string; /** Jump to the last page. */ last?: string; } export interface PaginationProps extends Omit, 'onChange'> { /** Total number of pages. Nothing renders below `1`. */ total: number; /** Controlled current page, 1-based (omit for uncontrolled). */ page?: number; /** Initial page when uncontrolled (default `1`). */ defaultPage?: number; onChange?: (page: number) => void; /** Pages shown either side of the current one (default `1`). */ siblings?: number; /** Pages always shown at the start and end (default `1`). */ boundaries?: number; /** Show the previous/next controls (default `true`). */ showControls?: boolean; /** Show first/last jump controls outside the previous/next ones (default `false`). */ showEdges?: boolean; disabled?: boolean; previousIcon?: IconContent; nextIcon?: IconContent; firstIcon?: IconContent; lastIcon?: IconContent; className?: string; style?: CSSProperties; classNames?: SlotClassNames; styles?: SlotStyles; /** Overrides the text Pagination renders of its own. Merged per key. */ labels?: PaginationLabels; }