//#region src/composables/createDataTable/columns.d.ts /** * @module createDataTable/columns * * @remarks * Utilities for resolving recursive column definitions into flat leaf * columns and 2D header grids. Used by createDataTable for header * rendering. */ interface ColumnNode { readonly id: string; readonly title?: string; readonly children?: readonly ColumnNode[]; } interface InternalHeader { id: string; title: string; colspan: number; rowspan: number; depth: number; } /** * Recursively extract leaf columns (those without children). * * @param columns Column tree to extract leaves from * @returns Flat array of leaf columns */ declare function extractLeaves(columns: readonly T[]): T[]; /** * Compute the maximum nesting depth of a column tree (0 = flat). * * @param columns Column tree to measure * @returns Maximum nesting depth */ declare function computeDepth(columns: readonly ColumnNode[]): number; /** * Resolve a recursive column tree into a 2D header grid. * * Each cell has colspan (number of leaf descendants) and rowspan * (how many rows a leaf spans when it doesn't fill all depth levels). * * @param columns Column tree to resolve * @returns 2D array of header cells with colspan/rowspan */ declare function resolveHeaders(columns: readonly ColumnNode[]): InternalHeader[][]; //#endregion export { ColumnNode, InternalHeader, computeDepth, extractLeaves, resolveHeaders };