import type { TablePaginationProps } from '@mui/material/TablePagination'; export interface ListPaginationProps { /** Zero-based, like MUI's own. */ page: number; pageSize: number; /** Rows rendered on the CURRENT page — not the collection's total. */ rowCount: number; onPageChange: (page: number) => void; /** * Omit on a list whose page size is not the reader's to choose — the size * menu is then not rendered at all. Most lists should pass it. */ onPageSizeChange?: (pageSize: number) => void; /** * The collection's total, when the caller genuinely knows it — a * client-side list, or a server `count()`. Leave undefined for a cursor or * growing-window feed, where nobody knows it without paying for it. */ count?: number; /** Cursor/window feeds: whether a further page exists. */ hasMore?: boolean; /** Override the count line, e.g. the screens tree's "top-level screens". */ labelDisplayedRows?: TablePaginationProps['labelDisplayedRows']; pageSizeOptions?: number[]; disabled?: boolean; } /** * The footer under every paginated list, whatever is behind it. * * The console grew four pagination grammars — a MUI X `DataGrid` footer, a * hand-rolled `TablePagination`, a bare Previous/Next button pair, and a * "Load more" that only ever grew — so the same act took a different control * depending on which list a reader was standing in, and two of the four * offered no way to change the page size at all. This is the one control. * * ## Counting without a count * * A cursor feed cannot say how many rows exist without reading them, which is * the cost pagination is there to avoid. MUI already models this: `count={-1}` * renders "1–10 of more than 10" and leaves Next live. * * The trick is the LAST page, where the total stops being unknown — once no * further page exists, `page × pageSize + rowCount` IS the total. Handing MUI * the real number there is what disables Next, so the control needs no * per-version knowledge of how to reach inside and disable that button. The * count line also stops saying "more than" at exactly the point it would * become a lie. * * `DataGrid` keeps its own footer — it renders one internally and cannot be * given this — but it is fed the same options, default and label from * `const/table-pagination`, so the two read identically. */ export declare function ListPagination(props: ListPaginationProps): import("react").JSX.Element; export declare namespace ListPagination { var displayName: string; } export default ListPagination;