import { Dispatch, ReactNode, SetStateAction } from 'react'; import type { DefaultAttributes } from '../types'; export declare type DataTableVariant = 'wide' | 'narrow'; export declare type TextAlign = 'left' | 'right' | 'center'; export declare type VerticalAlign = 'baseline' | 'top' | 'middle' | 'bottom' | 'sub' | 'text-top'; export declare type HeaderVariant = 'subtle' | 'strong'; export declare type FooterVariant = 'pagination' | 'custom'; export declare type DataTableHeader = { title: string | ReactNode; secondaryText?: string | ReactNode; variant?: HeaderVariant; }; export declare type ActionButtons = DefaultAttributes & { text: string; icon?: JSX.Element; onClick: (ids?: string[]) => void; disabled?: boolean; }; export declare type ActionBar = { text?: string; actionButtons: ActionButtons[]; }; export declare type ColumnHeaderProps = { title: string | ReactNode; icon?: JSX.Element; }; export declare type DataTableColumn = { header: ColumnHeaderProps; renderCell: (data: T) => React.ReactNode; textAlign?: TextAlign; verticalAlign?: VerticalAlign; onClick?: () => void; width?: string; hideCell?: boolean; hideHeader?: boolean; }; export declare type DataTableCustomFooter = { variant: 'custom'; content: ReactNode; }; export declare type DataTablePaginationFooter = { variant: 'pagination'; pagination: { controlledPagination: boolean; currentPage: number; rowsPerPage: number; externalPagination: boolean; totalNumberOfItems?: number; displayResults?: boolean; onChangePage?: (page?: number) => void | Promise; widePaginationLimiter?: number; resultsText?: { indicator: string; preposition: string; }; narrowPaginationText?: { indicator: string; preposition: string; }; }; }; export declare type SelectableRows = { rowId: string; selectedRows: string[]; disabledRows?: string[]; onRowClick: (rowId: string) => void; onSelectAll: (ids: string[], isSelected: boolean) => void; }; export declare type DataTableProps = DefaultAttributes & { variant?: DataTableVariant; header?: DataTableHeader; actionsBar?: ActionBar; columns: DataTableColumn[]; rows: T[]; selectableRows?: SelectableRows; footer?: DataTableCustomFooter | DataTablePaginationFooter; additionalRows?: DataTableAdditionalRow[]; }; export declare type MainHeaderComponentProps = DefaultAttributes & { variant: DataTableVariant; headerVariant: HeaderVariant; title: string | ReactNode; secondaryText?: string | ReactNode; }; export declare type PaginatedFooterComponentProps = DefaultAttributes & { footer: DataTableCustomFooter | DataTablePaginationFooter; currentPage: number; setCurrentPage: Dispatch>; numberOfRows: number; variant: DataTableVariant; }; export declare type TableHeaderProps = DefaultAttributes & { columns: DataTableColumn[]; rows: T[]; selectAllRows?: (ids: string[], isSelected: boolean) => void; selectedRows?: string[]; rowIdentifier?: string; }; export declare type TableBodyProps = DefaultAttributes & { filteredRows: T[]; columns: DataTableColumn[]; onRowClick?: (rowId: string) => void; selectedRows?: string[]; disabledRows?: string[]; rowIdentifier?: string; }; declare type AdditionalCell = { content: string | ReactNode; textAlign?: TextAlign; colSpan?: number; hideCell?: boolean; }; export declare type DataTableAdditionalRow = { cells: AdditionalCell[]; hideRow?: boolean; disabled?: boolean; }; export declare type TableFootProps = DefaultAttributes & { additionalRows: DataTableAdditionalRow[]; }; export {};