import { Nullable } from '../../../../../types/general';
import { VegaTableColumnConfig, VegaTableGroupColumnConfig, VegaTablePinnedType } from '../../../interface';
declare type IteratorMode = 'dfs' | 'bfs';
/**
 * Represents the hierarchical structure of table columns (including group columns).
 *
 * Responsibilities:
 * - Build the tree from flat or grouped column configs (.from / .fromGroupColumns)
 * - Provide traversal helpers (iterator / dfs) with caching
 * - Provide utility checks (isLeaf, hasGroupColumn, hasPinnedColumn)
 * - Produce leaf column configs for rendering (generateColumnConfigByLeaves)
 * - Order root children by pinned type for rendering (orderChildrenByPinned)
 */
export declare class ColumnStructureModel {
  readonly key: string;
  readonly level: number;
  readonly parent?: ColumnStructureModel;
  readonly label?: Nullable<string>;
  readonly pinned?: VegaTablePinnedType;
  private static readonly ROOT_LEVEL;
  private static readonly ROOT_KEY;
  children: ColumnStructureModel[];
  private leaves;
  private orderedChildren;
  private iteratorCacheMap;
  /**
   * Constructor for ColumnStructureModel.
   *
   * @param {string} key - Unique key for the column.
   * @param {number} level - Row level of this column (root uses ROOT_LEVEL).
   * @param {ColumnStructureModel} [parent] - Optional parent node.
   * @param {string} [label] - Optional display label for the column.
   * @param {VegaTablePinnedType} [pinned] - Optional pinned metadata ('left'|'right'|null).
   */
  constructor(key: string, level: number, parent?: ColumnStructureModel, label?: Nullable<string>, pinned?: VegaTablePinnedType);
  /**
   * Creates the root ColumnStructureModel from column configs.
   *
   * @param {VegaTableColumnConfig[]} columnsConfig - Array of column configs.
   * @param {Nullable<VegaTableGroupColumnConfig[]>} groupColumnConfig - Optional grouping configuration.
   * @returns {ColumnStructureModel} Root column structure model.
   */
  static from(columnsConfig: VegaTableColumnConfig[], groupColumnConfig: Nullable<VegaTableGroupColumnConfig[]>): ColumnStructureModel;
  /**
   * Recursively creates ColumnStructureModel children from group column configs.
   *
   * @param {ColumnStructureModel} parent - Parent node for the created children.
   * @param {VegaTableGroupColumnConfig[]} groupColumns - Array of group column configs.
   * @param {number} level - Current row level.
   * @returns {ColumnStructureModel[]} Array of child column structure models.
   */
  private static fromGroupColumns;
  /**
   * Generates an array of VegaTableColumnConfig for all leaf columns.
   *
   * @param {VegaTableColumnConfig[]} columns - Array of all column configs.
   * @returns {VegaTableColumnConfig[]} Array of configs for leaf columns.
   */
  generateColumnConfigByLeaves(columns: VegaTableColumnConfig[]): VegaTableColumnConfig[];
  /**
   * Compute the maximum depth (highest level value) under this node.
   * This is useful to determine the number of header rows required for rendering.
   *
   * @returns {number} Maximum level found in the subtree (or 0 when empty).
   */
  getMaxDepth(): number;
  /**
   * Checks if this subtree contains any group (non-leaf) columns.
   *
   * @returns {boolean} True if any descendant is a group column.
   */
  hasGroupColumn(): boolean;
  /**
   * Checks if this subtree contains any left pinned children.
   *
   * @returns {boolean} True if any immediate child has a pinned value.
   */
  hasLeftPinnedColumn(): boolean;
  /**
   * Checks if this subtree contains any right pinned children.
   *
   * @returns {boolean} True if any immediate child has a pinned value.
   */
  hasRightPinnedColumn(): boolean;
  /**
   * Checks if this node is a leaf (no children).
   *
   * @returns {boolean} True when this node has no children.
   */
  isLeaf(): boolean;
  /**
   * Return an array of nodes for this subtree using the specified traversal mode.
   *
   * Currently only depth-first search ('dfs') is supported. The returned array is
   * cached per-mode to avoid repeated traversal costs.
   *
   * @param {IteratorMode} mode - Traversal mode to use. Defaults to 'dfs'.
   * @returns {ColumnStructureModel[]} Array of ColumnStructureModel nodes in traversal order.
   */
  iterator(mode?: IteratorMode): ColumnStructureModel[];
  /**
   * Gets all leaf nodes in the subtree, with caching.
   *
   * Subsequent calls return the cached array until the underlying model is rebuilt.
   *
   * @returns {ColumnStructureModel[]} Array of leaf column models.
   */
  getLeaves(): ColumnStructureModel[];
  /**
   * For root nodes, returns children ordered by pinned type (left, none, right).
   * For non-root nodes, returns children in their natural order.
   *
   * @returns {ColumnStructureModel[]} Array of child column models.
   */
  getOrderedChildren(): ColumnStructureModel[];
  /**
   * Orders root children by pinned type (left, none, right) and caches the result.
   *
   * For non-root nodes this method returns children in their natural order.
   *
   * @returns {ColumnStructureModel[]} Array of ordered child column models.
   */
  private orderChildrenByPinned;
  /**
   * Checks if this node is the root node.
   *
   * @returns {boolean} True if root node, false otherwise.
   */
  private isRoot;
  /**
   * Performs a depth-first traversal of the column structure.
   *
   * The traversal respects root-child pinned ordering (left/no/right) for the root node.
   * Results are cached per-node to avoid repeated recursion costs.
   *
   * @returns {ColumnStructureModel[]} Array of all nodes in DFS order.
   */
  private dfsIterator;
}
export {};
