/**
 * DOM Builder - Direct DOM construction for performance.
 *
 * Using direct DOM APIs instead of innerHTML is significantly faster:
 * - No HTML parsing by the browser
 * - No template string concatenation
 * - Immediate element creation without serialization/deserialization
 *
 * Benchmark: DOM construction is ~2-3x faster than innerHTML for complex structures.
 */
/**
 * Create an element with attributes and optional children.
 * Optimized helper that avoids repeated function calls.
 */
export declare function createElement<K extends keyof HTMLElementTagNameMap>(tag: K, attrs?: Record<string, string>, children?: (Node | string | null | undefined)[]): HTMLElementTagNameMap[K];
/**
 * Create a text node (shorthand).
 */
export declare function text(content: string): Text;
/**
 * Create an element with class (common pattern).
 */
export declare function div(className?: string, attrs?: Record<string, string>): HTMLDivElement;
/**
 * Create a button element.
 */
export declare function button(className?: string, attrs?: Record<string, string>, content?: string | Node): HTMLButtonElement;
/**
 * Create a slot element for light DOM projection.
 * @deprecated The grid now uses light DOM without Shadow DOM, so slots are no longer used.
 * This function is kept for backward compatibility but should not be used in new code.
 */
export declare function slot(name?: string): HTMLSlotElement;
/**
 * Append multiple children to a parent element.
 */
export declare function appendChildren(parent: Element, children: (Node | null | undefined)[]): void;
/**
 * Set multiple attributes on an element.
 */
export declare function setAttrs(el: Element, attrs: Record<string, string | undefined>): void;
/**
 * Clone the grid content structure.
 * Using template cloning is faster than createElement for nested structures.
 */
export declare function cloneGridContent(): DocumentFragment;
/**
 * Build the grid root structure using direct DOM construction.
 * This is called once per grid instance during initial render.
 */
export interface GridDOMOptions {
    hasShell: boolean;
    /** Shell header element (pre-built) */
    shellHeader?: Element;
    /** Shell body element with tool panel (pre-built) */
    shellBody?: Element;
}
/**
 * Build the complete grid DOM structure.
 * Returns a DocumentFragment ready to be appended to shadow root.
 */
export declare function buildGridDOM(options: GridDOMOptions): DocumentFragment;
/**
 * Build shell header using direct DOM construction.
 *
 * Note: The grid no longer creates buttons from config (icon/action).
 * Config/API buttons only use element or render function.
 * Light DOM buttons are slotted directly.
 * The ONLY button the grid creates is the panel toggle.
 */
export interface ShellHeaderOptions {
    title?: string;
    hasPanels: boolean;
    isPanelOpen: boolean;
    toolPanelIcon: string;
    /** Config toolbar buttons with element/render (pre-sorted by order) */
    configButtons: Array<{
        id: string;
        hasElement?: boolean;
        hasRender?: boolean;
    }>;
    /** API toolbar buttons with element/render (pre-sorted by order) */
    apiButtons: Array<{
        id: string;
        hasElement?: boolean;
        hasRender?: boolean;
    }>;
}
/**
 * Build shell header element directly without innerHTML.
 */
export declare function buildShellHeader(options: ShellHeaderOptions): HTMLDivElement;
/**
 * Build shell body (grid content + optional tool panel).
 */
export interface ShellBodyOptions {
    position: 'left' | 'right';
    isPanelOpen: boolean;
    expandIcon: string;
    collapseIcon: string;
    /** Sorted panels for accordion */
    panels: Array<{
        id: string;
        title: string;
        icon?: string;
        isExpanded: boolean;
    }>;
}
/**
 * Build shell body element directly without innerHTML.
 */
export declare function buildShellBody(options: ShellBodyOptions): HTMLDivElement;
//# sourceMappingURL=dom-builder.d.ts.map