import { type Node as YogaNode } from 'yoga-layout';
import { type StyledLine } from './styled-line.js';
import { type Styles } from './styles.js';
import { type OutputTransformer } from './render-node-to-output.js';
import type ResizeObserver from './resize-observer.js';
import { type Region } from './output.js';
type InkNode = {
    parentNode: DOMElement | undefined;
    yogaNode?: YogaNode;
    internal_static?: boolean;
    style: Styles;
};
export type TextName = '#text';
export type ElementNames = 'ink-root' | 'ink-box' | 'ink-text' | 'ink-virtual-text' | 'ink-static-render';
export type NodeNames = ElementNames | TextName;
export type StickyHeader = {
    nodeId: number;
    lines: readonly StyledLine[];
    stuckLines?: readonly StyledLine[];
    styledOutput: readonly StyledLine[];
    x: number;
    y: number;
    naturalRow: number;
    startRow: number;
    endRow: number;
    scrollContainerId: number | string;
    isStuckOnly: boolean;
    relativeX?: number;
    relativeY?: number;
    height?: number;
    parentRelativeTop?: number;
    parentHeight?: number;
    parentBorderTop?: number;
    parentBorderBottom?: number;
    type?: 'top' | 'bottom';
    node?: DOMElement;
    maxStuckY?: number;
    minStuckY?: number;
};
export type DOMElement = {
    nodeName: ElementNames;
    attributes: Record<string, DOMNodeAttribute>;
    childNodes: DOMNode[];
    internal_transform?: OutputTransformer;
    internal_terminalCursorFocus?: boolean;
    internal_terminalCursorPosition?: number;
    internalOnBeforeRender?: (node: DOMElement, options?: {
        trackSelection?: boolean;
    }) => void;
    cachedRender?: Region;
    internal_accessibility?: {
        role?: 'button' | 'checkbox' | 'combobox' | 'list' | 'listbox' | 'listitem' | 'menu' | 'menuitem' | 'option' | 'progressbar' | 'radio' | 'radiogroup' | 'tab' | 'tablist' | 'table' | 'textbox' | 'timer' | 'toolbar';
        state?: {
            busy?: boolean;
            checked?: boolean;
            disabled?: boolean;
            expanded?: boolean;
            multiline?: boolean;
            multiselectable?: boolean;
            readonly?: boolean;
            required?: boolean;
            selected?: boolean;
        };
    };
    isStaticDirty?: boolean;
    staticNode?: DOMElement;
    onComputeLayout?: () => void;
    onRender?: () => void;
    onImmediateRender?: () => void;
    internal_scrollState?: ScrollState;
    internalSticky?: boolean | 'top' | 'bottom';
    internalStickyAlternate?: boolean;
    internalOpaque?: boolean;
    internalScrollbar?: boolean;
    resizeObservers?: Set<ResizeObserver>;
    internal_lastMeasuredSize?: {
        width: number;
        height: number;
    };
    internalMaxScrollTop?: number;
    internalIsScrollbackDirty?: boolean;
    internalId: number;
} & InkNode;
export type ScrollState = {
    scrollTop: number;
    scrollLeft: number;
    scrollHeight: number;
    actualScrollHeight: number;
    scrollWidth: number;
    clientHeight: number;
    clientWidth: number;
};
export type TextNode = {
    nodeName: TextName;
    nodeValue: string;
} & InkNode;
export type DOMNode<T = {
    nodeName: NodeNames;
}> = T extends {
    nodeName: infer U;
} ? U extends '#text' ? TextNode : DOMElement : never;
export type DOMNodeAttribute = boolean | string | number;
export declare const createNode: (nodeName: ElementNames) => DOMElement;
export declare const appendChildNode: (node: DOMElement, childNode: DOMElement) => void;
export declare const insertBeforeNode: (node: DOMElement, newChildNode: DOMNode, beforeChildNode: DOMNode) => void;
export declare const removeChildNode: (node: DOMElement, removeNode: DOMNode) => void;
export declare const setAttribute: (node: DOMElement, key: string, value: DOMNodeAttribute) => void;
export declare const setStyle: (node: DOMNode, style: Styles) => void;
export declare const createTextNode: (text: string) => TextNode;
export declare const setCachedRender: (node: DOMElement, cachedRender: Region) => void;
export declare const setTextNodeValue: (node: TextNode, text: string) => void;
export declare const getPathToRoot: (node: DOMNode) => DOMNode[];
export declare const isNodeSelectable: (node: DOMElement) => boolean;
export {};
