import type { HotInstance } from '../../../core/types'; import type { NestedRows } from '../nestedRows'; import BaseUI from './_base'; /** * Minimal interface for DataManager methods used by HeadersUI. */ interface NestedRowsDataManager { getDataObject(rowIndex: number): Record | null; getRowLevel(rowIndex: number): number; hasChildren(rowObject: Record): boolean; cache: { levelCount: number; }; } /** * Minimal interface for CollapsingUI methods used by HeadersUI. */ interface NestedRowsCollapsingUI { areChildrenCollapsed(rowIndex: number): boolean; } /** * Class responsible for the UI in the Nested Rows' row headers. * * @private * @class HeadersUI * @augments BaseUI */ declare class HeadersUI extends BaseUI { /** * Reference to the DataManager instance connected with the Nested Rows plugin. * * @type {object} */ dataManager: NestedRowsDataManager | null; /** * Reference to the CollapsingUI instance connected with the Nested Rows plugin. * * @type {object} */ collapsingUI: NestedRowsCollapsingUI | null; /** * Cache for the row headers width. * * @type {null|number} */ rowHeaderWidthCache: number | null; /** * CSS classes used in the row headers. * * @type {object} */ static get CSS_CLASSES(): { indicatorContainer: string; parent: string; indicator: string; emptyIndicator: string; button: string; expandButton: string; collapseButton: string; }; /** * Initializes the headers UI component and sets up the data manager reference used to determine nesting levels for each row header. */ constructor(nestedRowsPlugin: NestedRows, hotInstance: HotInstance); /** * Append nesting indicators and buttons to the row headers. * * @private * @param {number} row Row index. * @param {HTMLElement} TH TH 3element. */ appendLevelIndicators(row: number, TH: HTMLTableCellElement): void; /** * Update the row header width according to number of levels in the dataset. * * @private * @param {number} deepestLevel Cached deepest level of nesting. */ updateRowHeaderWidth(deepestLevel?: unknown): void; } export default HeadersUI;