/**
 * Canvas Manager - Dynamic Terminal UI Components
 *
 * Provides A2UI-style dynamic rendering for terminal interfaces.
 */
import { EventEmitter } from 'events';
export type ComponentType = 'text' | 'box' | 'panel' | 'progress' | 'spinner' | 'table' | 'list' | 'input';
export interface ComponentStyle {
    color?: string;
    bgColor?: string;
    bold?: boolean;
    italic?: boolean;
    underline?: boolean;
    dim?: boolean;
    border?: 'single' | 'double' | 'rounded' | 'none';
    padding?: number | {
        top?: number;
        right?: number;
        bottom?: number;
        left?: number;
    };
    margin?: number | {
        top?: number;
        right?: number;
        bottom?: number;
        left?: number;
    };
    width?: number | string;
    height?: number | string;
    align?: 'left' | 'center' | 'right';
}
export interface CanvasComponent {
    id: string;
    type: ComponentType;
    content: string | string[] | CanvasComponent[];
    style?: ComponentStyle;
    visible: boolean;
    zIndex: number;
    x?: number;
    y?: number;
}
export interface CanvasConfig {
    width: number;
    height: number;
    refreshRate: number;
    clearOnRender: boolean;
}
export declare const DEFAULT_CANVAS_CONFIG: CanvasConfig;
export declare function createComponent(type: ComponentType, content: string | string[] | CanvasComponent[], style?: ComponentStyle): CanvasComponent;
export declare function createText(text: string, style?: ComponentStyle): CanvasComponent;
export declare function createBox(content: string | CanvasComponent[], style?: ComponentStyle): CanvasComponent;
export declare function createPanel(title: string, content: CanvasComponent[], style?: ComponentStyle): CanvasComponent;
export declare function createProgress(percent: number, width?: number, style?: ComponentStyle): CanvasComponent;
export declare function createSpinner(frame?: number, style?: ComponentStyle): CanvasComponent;
export declare function createTable(headers: string[], rows: string[][], style?: ComponentStyle): CanvasComponent;
export declare function createList(items: string[], style?: ComponentStyle): CanvasComponent;
export declare class CanvasRenderer {
    private buffer;
    private width;
    private height;
    constructor(width: number, height: number);
    clear(): void;
    drawText(text: string, x: number, y: number, style?: ComponentStyle): void;
    drawBox(x: number, y: number, width: number, height: number, style?: ComponentStyle): void;
    render(): string;
    toString(): string;
}
export declare class CanvasManager extends EventEmitter {
    private config;
    private components;
    private renderer;
    private renderInterval;
    private dirty;
    constructor(config?: Partial<CanvasConfig>);
    add(component: CanvasComponent): string;
    remove(id: string): boolean;
    get(id: string): CanvasComponent | undefined;
    update(id: string, updates: Partial<CanvasComponent>): boolean;
    show(id: string): void;
    hide(id: string): void;
    clear(): void;
    render(): string;
    private renderComponent;
    private getComponentHeight;
    startAutoRender(): void;
    stopAutoRender(): void;
    getStats(): {
        componentCount: number;
        visibleCount: number;
        dirty: boolean;
    };
}
export declare function getCanvasManager(config?: Partial<CanvasConfig>): CanvasManager;
export declare function resetCanvasManager(): void;
export type { ComponentType as A2UIComponentType, A2UIStyles, A2UIAction, A2UIComponent, ComponentProps, LayoutComponentProps, TextComponentProps, HeadingComponentProps, ImageComponentProps, IconComponentProps, ButtonComponentProps, TextFieldComponentProps, TextAreaComponentProps, CheckboxComponentProps, RadioComponentProps, SwitchComponentProps, SliderComponentProps, SelectComponentProps, CardComponentProps, TabsComponentProps, TabItemComponentProps, ModalComponentProps, TableComponentProps, ChartComponentProps, ProgressComponentProps, ListComponentProps, CodeComponentProps, MarkdownComponentProps, CustomComponentProps, SurfaceUpdateMessage, DataModelUpdateMessage, BeginRenderingMessage, DeleteSurfaceMessage, A2UIMessage, UserActionMessage, ErrorMessage, A2UIClientMessage, CanvasPresentCommand, CanvasNavigateCommand, CanvasEvalCommand, CanvasSnapshotCommand, CanvasA2UICommand, CanvasCommand, Surface, RenderedComponent, } from './a2ui-types.js';
export { A2UI_VERSION, STANDARD_CATALOG_ID, DEFAULT_SURFACE_STYLES, } from './a2ui-types.js';
export type { A2UIManagerEvents } from './a2ui-manager.js';
export { A2UIManager, getA2UIManager, resetA2UIManager, } from './a2ui-manager.js';
export type { A2UIServerConfig, A2UIClient, A2UIServerEvents } from './a2ui-server.js';
export { A2UIServer, getA2UIServer, resetA2UIServer, DEFAULT_A2UI_SERVER_CONFIG, } from './a2ui-server.js';
export type { A2UIAction as A2UIToolAction, A2UIToolInput, A2UIToolResult } from './a2ui-tool.js';
export { A2UITool, getA2UITool, resetA2UITool, } from './a2ui-tool.js';
export type { Canvas, CanvasConfig as VisualCanvasConfig, CanvasElement, CanvasElementType, CanvasHistoryEntry, Position, Size, ElementStyle, ExportOptions, ExportFormat, } from './types.js';
export { DEFAULT_CANVAS_CONFIG as DEFAULT_VISUAL_CANVAS_CONFIG } from './types.js';
export { CanvasManager as VisualCanvasManager, getCanvasManager as getVisualCanvasManager, resetCanvasManager as resetVisualCanvasManager, } from './canvas-manager.js';
