import type { HotInstance } from '../../../core/types'; import type StateManager from '../stateManager'; /** * The class generates the nested headers structure in the DOM and reads the column width for * each column. * * @private */ declare class GhostTable { #private; /** * Reference to the Handsontable instance. * * @private * @type {Handsontable} */ hot: HotInstance; /** * The state manager for the nested headers. * * @private * @type {StateManager} */ headersStateManager: StateManager; /** * The value that holds information about the number of the nested header layers (header rows). * * @private * @type {number} */ layersCount: number; /** * Temporary element created to get minimal headers widths. * * @private * @type {*} */ container: HTMLElement | null; /** * PhysicalIndexToValueMap to keep and track of the columns' widths (as rendered in the main table). * * @private * @type {PhysicalIndexToValueMap} */ widthsMap: import("../../../translations").PhysicalIndexToValueMap; /** * Initializes the ghost table with the Handsontable instance and headers state manager, and registers the widths index map. */ constructor({ hot, headersStateManager }: { hot: HotInstance; headersStateManager: StateManager; }); /** * Sets the number of nested headers layers count. * * @param {number} layersCount Total number of headers levels. * @returns {GhostTable} */ setLayersCount(layersCount: number): this; /** * Gets the column width based on the visual column index (as rendered in the main table). * * @param {number} visualColumn Visual column index. * @returns {number|null} */ getWidth(visualColumn: number): number | undefined; /** * Build cache of the headers widths. */ buildWidthsMap(): void; /** * Clear the widths cache. */ clear(): void; } export default GhostTable;