import type { HighlightMode, TableSize, TableActionsBase, TableColumn, TableDataSource, TableExpandable, TableRowSelection, TableRowState, TableScroll, TableSelectionMode, TableCollectable, TableToggleable, TablePinnable, TableDraggable } from '@mezzanine-ui/core/table'; import type { EmptyProps } from '../Empty'; import type { PaginationProps } from '../Pagination'; import type { UseTableFixedOffsetsReturn } from './hooks/useTableFixedOffsets'; import type { TableTransitionState } from './hooks/useTableDataSource'; /** Sorting context state */ export interface TableSortingState { onSort: (key: string) => void; } /** Selection context state */ export interface TableSelectionState { config: TableRowSelection; isAllSelected: boolean; isIndeterminate: boolean; isRowDisabled: (record: T) => boolean; isRowSelected: (key: string) => boolean; mode: TableSelectionMode; selectedRowKeys: string[]; toggleAll: () => void; toggleRow: (key: string, record: T) => void; } /** Expansion context state */ export interface TableExpansionState { config: TableExpandable; expansionLeftPadding: number; expandedRowKeys: string[]; isRowExpanded: (key: string) => boolean; toggleExpand: (key: string, record: T) => void; } /** Column state with computed widths */ export interface TableResizedColumnState { getResizedColumnWidth: (key: string) => number | undefined; setResizedColumnWidth: (key: string, width: number) => void; } /** Highlight state for hover effects */ export interface TableHighlightState { columnIndex: number | null; mode: HighlightMode; rowIndex: number | null; setHoveredCell: (rowIndex: number | null, columnIndex: number | null) => void; } /** Main table context */ export interface TableContextValue { actions?: TableActionsBase; collectable?: TableCollectable; columnState?: TableResizedColumnState; dataSource: T[]; draggable?: Omit, 'onDragEnd'>; emptyProps?: EmptyProps & { height?: number | string; }; expansion?: TableExpansionState; fixedOffsets?: UseTableFixedOffsetsReturn; highlight?: TableHighlightState; isContainerReady?: boolean; isInsideExpandedContentArea?: boolean; isScrollingHorizontally?: boolean; loading?: boolean; pagination?: PaginationProps; pinnable?: TablePinnable; resizable?: boolean; rowState?: TableRowState | ((rowData: TableDataSource) => TableRowState | undefined); rowHeight: number; scroll?: TableScroll; scrollContainerRef?: React.RefObject; selection?: TableSelectionState; separatorAtRowIndexes?: number[]; size?: TableSize; sorting?: TableSortingState; toggleable?: TableToggleable; transitionState?: TableTransitionState; virtualScrollEnabled?: boolean; zebraStriping?: boolean; } export declare const TableContext: import("react").Context | null>; export declare function useTableContext(): TableContextValue; /** Data context for performance optimization */ export interface TableDataContextValue { columns: TableColumn[]; dataSource: T[]; } export declare const TableDataContext: import("react").Context | null>; export declare function useTableDataContext(): TableDataContextValue; export interface TableSuperContextValue { containerWidth?: number; getResizedColumnWidth?: (key: string) => number | undefined; scrollLeft?: number; expansionLeftPadding?: number; hasDragOrPinHandleFixed?: boolean; } export declare const TableSuperContext: import("react").Context; export declare function useTableSuperContext(): TableSuperContextValue;