import { Distinct } from "helpers";
import { ComponentDefinition, CustomComponentInstance, NodeId, NodeType, SlotInstancePrimitive } from "./types";
/**
 * This file contains type-safe helper functions for working with table instances
 */
export type TableInstance = Distinct<CustomComponentInstance, "table">;
export type TableRowInstance = Distinct<CustomComponentInstance, "row">;
export type TableCellInstance = Distinct<CustomComponentInstance, "cell">;
export type TableHeaderRowInstance = Distinct<CustomComponentInstance, "header-row">;
export type TableHeaderCellInstance = Distinct<CustomComponentInstance, "header-cell">;
/**
 * Helper functions for getting rows / cells / etc
 */
export declare function getTableRows(definition: ComponentDefinition, node: TableInstance): TableRowInstance[] | null;
export declare function getTableRowSlotInstance(definition: ComponentDefinition, node: TableRowInstance): SlotInstancePrimitive;
export declare function getTableCells(definition: ComponentDefinition, node: TableRowInstance): TableCellInstance[];
export declare function getTableRowFromCell(definition: ComponentDefinition, node: TableCellInstance): TableRowInstance;
export declare function getTableHeaderRow(definition: ComponentDefinition, node: TableInstance): TableHeaderRowInstance | null;
export declare function getTableHeaderSlotInstance(definition: ComponentDefinition, node: TableHeaderRowInstance): SlotInstancePrimitive;
export declare function getTableHeaderCells(definition: ComponentDefinition, node: TableHeaderRowInstance): TableHeaderCellInstance[];
export declare function getTableFromDescendent(definition: ComponentDefinition, nodeId: NodeId): TableInstance | null;
/**
 * Type assertions
 */
export declare function isTableInstance(node: NodeType): node is TableInstance;
export declare function isTableRow(node: NodeType): node is TableRowInstance;
export declare function ensureIsTableRow(node: NodeType): TableRowInstance;
export declare function isTableRowSlotInstance(node: NodeType): node is SlotInstancePrimitive;
export declare function isTableCellInstance(node: NodeType): node is TableCellInstance;
export declare function ensureIsTableCellInstance(node: NodeType): TableCellInstance;
export declare function isTableHeaderCellInstance(node: NodeType): node is TableHeaderCellInstance;
export declare function isTableHeaderRow(node: NodeType): node is TableHeaderRowInstance;
export declare function ensureIsTableHeaderRow(node: NodeType): TableHeaderRowInstance;
export declare function isTableNodeInstance(node: NodeType): boolean;
//# sourceMappingURL=table-helpers.d.ts.map