import type { StyleProperties, BoundingBox, LayoutMode, MeasuredSize, ContainerLayout, IDocument } from "./types";
import { Vector, type VectorLike } from "../lib/vector";
import type { ShapeStyle, Theme } from "./theme";
import { type MarkdownSegment } from "./markdown";
export interface CreateContainerOptions {
    layout?: ContainerLayout;
    style?: StyleProperties;
    classname?: string;
    width?: number;
    height?: number;
    position?: VectorLike;
    z_index?: number;
}
export interface CreateTextOptions {
    content: string;
    style?: StyleProperties;
    classname?: string;
    position?: VectorLike;
    width?: number;
    parse_markdown?: boolean;
    z_index?: number;
}
export interface CreateRectOptions {
    style?: StyleProperties;
    shape_style?: ShapeStyle;
    position?: VectorLike;
    width?: number;
    height?: number;
    z_index?: number;
}
export interface CreateImageOptions {
    name: string;
    position?: VectorLike;
    width?: number;
    height?: number;
    z_index?: number;
}
export interface TableCellInput {
    content: string;
    segments?: MarkdownSegment[];
    style?: StyleProperties;
}
export interface CreateTableOptions {
    columns: number | number[];
    style?: StyleProperties;
    position?: VectorLike;
    width?: number;
    border_color?: string;
    border_width?: number;
    cell_padding?: number;
    header_style?: StyleProperties;
    cell_style?: StyleProperties;
    z_index?: number;
}
export declare const resolve_element_style: (style: StyleProperties | undefined, classname: string | undefined, element_type: "heading" | "text" | "container", theme: Theme | null) => StyleProperties;
export declare abstract class BaseElement {
    readonly id: symbol;
    readonly layout_mode: LayoutMode;
    measured_size: MeasuredSize | null;
    computed_position: Vector | null;
    computed_size: Vector | null;
    _document: IDocument | null;
    _theme: Theme | null;
    _doc_parse_markdown: boolean;
    protected _children: BaseElement[];
    z_index: number;
    constructor(layout_mode: LayoutMode);
    abstract measure(avail_width: number): MeasuredSize;
    layout_children(_origin: Vector, _avail_width: number): void;
    abstract render(pdoc: any): void;
    get_position(): Vector;
    get_size(): Vector;
    get_bbox(): BoundingBox;
    protected _resolve_style(style: StyleProperties | undefined, classname: string | undefined, element_type: "heading" | "text" | "container"): StyleProperties;
    protected _measure_children(avail_width: number): void;
    protected _render_children(pdoc: any): void;
    text(options: CreateTextOptions): TextElement;
    rect(options: CreateRectOptions): RectElement;
    image(options: CreateImageOptions): ImageElement;
    create_container(options?: CreateContainerOptions): ContainerElement;
}
export declare class TextElement extends BaseElement {
    readonly options: CreateTextOptions;
    private resolved_style;
    private doc_parse_markdown;
    private _wrap_width;
    constructor(options: CreateTextOptions, resolved_style: StyleProperties, doc_parse_markdown: boolean);
    measure(avail_width: number): MeasuredSize;
    render(pdoc: any): void;
}
export declare class RectElement extends BaseElement {
    readonly options: CreateRectOptions;
    constructor(options: CreateRectOptions, _resolved_style: StyleProperties);
    measure(avail_width: number): MeasuredSize;
    render(pdoc: any): void;
}
export declare class ImageElement extends BaseElement {
    readonly options: CreateImageOptions;
    constructor(options: CreateImageOptions);
    measure(avail_width: number): MeasuredSize;
    render(pdoc: any): void;
}
export declare class ContainerElement extends BaseElement {
    protected children: BaseElement[];
    readonly options: CreateContainerOptions;
    readonly resolved_style: StyleProperties;
    protected padding: {
        top: number;
        right: number;
        bottom: number;
        left: number;
    };
    constructor(options: CreateContainerOptions, resolved_style: StyleProperties);
    add(...elements: BaseElement[]): this;
    get_elements(): BaseElement[];
    measure(avail_width: number): MeasuredSize;
    layout_children(origin: Vector, avail_width: number): void;
    private layout_flow;
    private layout_flex_row;
    private layout_flex_column;
    render(pdoc: any): void;
}
export declare class TableElement extends BaseElement {
    private rows;
    private col_widths;
    private row_heights;
    readonly options: CreateTableOptions;
    private resolved_style;
    constructor(options: CreateTableOptions, resolved_style: StyleProperties);
    add_row(cells: Array<string | TableCellInput>): this;
    private resolve_column_widths;
    measure(avail_width: number): MeasuredSize;
    render(pdoc: any): void;
}
export declare class HeaderContainer extends ContainerElement {
    zone_height: number;
    constructor(options: CreateContainerOptions, resolved_style: StyleProperties);
    measure(avail_width: number): MeasuredSize;
}
export declare const make_text: (options: CreateTextOptions, theme: Theme | null, parse_markdown: boolean) => TextElement;
export declare const make_rect: (options: CreateRectOptions, theme: Theme | null, parse_markdown: boolean) => RectElement;
export declare const make_image: (options: CreateImageOptions, theme: Theme | null, parse_markdown: boolean) => ImageElement;
export declare const make_container: (options: CreateContainerOptions | undefined, theme: Theme | null, parse_markdown: boolean) => ContainerElement;
export declare const make_table: (options: CreateTableOptions, theme: Theme | null, parse_markdown: boolean) => TableElement;
export declare class FooterContainer extends ContainerElement {
    zone_height: number;
    constructor(options: CreateContainerOptions, resolved_style: StyleProperties);
    measure(avail_width: number): MeasuredSize;
}
