import { type ItemsPerPageProps } from './ItemsPerPage'; import { type PagePickerProps } from './PagePicker'; import { type PaginationSlotRecipeVariantProps } from '../../styled-system/recipes'; export type PaginationItemsPerPageProps = { /** * This prop allows you to change the label for the "displayed number per page". If you don't provide this prop, the default label is "1ページの表示数". */ label?: string; /** * Options for items per page. If undefined, the ItemsPerPage section is not displayed. */ options?: number[]; /** * Handler to execute when the items per page is changed. Accepts the new items per page number as an argument. */ onChange?: (itemsPerPage: number) => void; }; export type PaginationProps = { /** * The alternative text for the pagination root. */ 'aria-label'?: string; /** * The number of the current page. */ currentPageNumber: number; /** * The total number of items. */ totalItems: number; /** * The number of items per page. */ itemsPerPage: number; /** * The label of the unit. * * @default '件' */ unitLabel?: string; /** * Whether to show items count. * * @default false */ showItemsCount?: boolean; /** * Whether to show page picker. * * @default false */ showPagePicker?: boolean; /** * The alignment of the pagination component. * * @default 'left' */ alignment?: PaginationSlotRecipeVariantProps['alignment']; /** * Handler to execute when the page is changed. Accepts the new page number as an argument. */ onPageChange?: (pageNumber: number) => void; /** * This prop allows you to change the label for the "page". If you don't provide this prop, the default label is "ページ". */ pageSuffixLabel?: string; } & ({ /** * Whether to show items per page. * * @default false */ showItemsPerPage: true; /** * Props for the ItemsPerPage component. */ itemsPerPageProps: PaginationItemsPerPageProps; } | { /** * Whether to show items per page. * * @default false */ showItemsPerPage: false; /** * Props for the ItemsPerPage component. */ itemsPerPageProps?: PaginationItemsPerPageProps; }) & Pick & Pick;