import { QueryMarkdownBlockRenderer, type TableBlockKind } from './renderer.js';
import type { MdBlockExecutionResult, MdTableCell } from './types.js';
type TableEditorActionKind = 'add' | 'remove' | 'validate' | 'link' | 'undo' | 'redo' | 'ai' | 'properties';
type TableEditorActionContext = {
    action: TableEditorActionKind;
    root: HTMLElement;
    columns: string[];
    rows: Array<{
        index: number;
        cells: string[];
    }>;
    row?: {
        index: number;
        cells: string[];
    };
    propertyDefinitions?: Array<{
        name: string;
        predicate: string;
        multiple: boolean;
        datatypeIri?: string;
        classIri?: string;
        nodeKind?: string;
        editor?: 'multiline';
    }>;
    blockSource?: string;
    typeOptions?: string[];
    instanceNamePrefix?: string;
    pointerX?: number;
    pointerY?: number;
};
export declare class TableMarkdownBlockRenderer extends QueryMarkdownBlockRenderer {
    protected readonly tableKinds: ReadonlyArray<TableBlockKind>;
    canRender(result: MdBlockExecutionResult): boolean;
    render(result: MdBlockExecutionResult): HTMLElement;
    protected appendCustomLeftControls(_leftControls: HTMLDivElement, _context: Omit<TableEditorActionContext, 'action'> & {
        options?: Record<string, unknown>;
    }): void;
    protected decorateCellValueElement(params: {
        row: {
            index: number;
            cells: string[];
        };
        columnIndex: number;
        columns: string[];
        value: string;
        valueElement: HTMLElement;
    }): HTMLElement;
    protected shouldIgnoreRowDoubleClick(_event: MouseEvent): boolean;
    protected onRowDoubleClick(_context: Omit<TableEditorActionContext, 'action'>): void;
    protected dispatchTableEditorAction(context: TableEditorActionContext): void;
    protected renderInteractiveTable(columns: string[], rows: string[][], rowsTyped: MdTableCell[][] | undefined, stylesheet: CompiledTableStyleRule[], options: Record<string, unknown> | undefined, blockSource?: string, blockId?: string): HTMLElement;
    protected extractTypeOptions(_blockSource: string | undefined): string[];
    private resolveTreeSourceRows;
    private filterTreeRowsBySearch;
    private createTreeModel;
    private flattenTreeRows;
    private flattenAllTreeRows;
    private renderTreeCell;
    private createTreeActionButton;
    private applyFiltersAndSorting;
    private getDisplayFilterCells;
    private applyStylesheet;
    private matchesRule;
    private resolveValueTargets;
    private buildGridTemplate;
    private createInitialColumnWidths;
    private scheduleInitialAutosize;
    private installColumnResizeHandle;
    private autosizeColumnWidth;
    private measureTreePrefixWidth;
    private measureRenderedCellContentWidth;
    private resolveFont;
    private measureTextWidth;
    protected formatCellDisplayValue(raw: string, _context: {
        columnIndex: number;
        columns: string[];
        blockSource?: string;
        options?: Record<string, unknown>;
    }): string;
    private renderValue;
    protected createUploadCsvButton(_columns: string[], _rows: Array<{
        index: number;
        cells: string[];
    }>, _isTree: boolean, _blockSource: string | undefined): HTMLElement | undefined;
    protected transformCsvDownloadData(columns: string[], rows: string[][]): {
        columns: string[];
        rows: string[][];
    };
    private requestCsvDownload;
    private requestTreeJsonDownload;
    private createTreeJsonKeys;
}
type TableRuleKind = 'row' | 'column' | 'cell' | 'header';
type TableRuleTarget = 'cell' | 'value';
type TableSelector = {
    kind: TableRuleKind;
    condition?: string;
};
type CompiledTableStyleRule = {
    selectors: TableSelector[];
    target: TableRuleTarget;
    style: Record<string, string>;
};
export {};
