import { Page, PageChild, PageOptions } from '../view/Page';
import { Paragraph } from '../view/Paragraph';
import { LayoutNode } from '../view/base';
import { TableCell } from '../view/TableCell';
import { Doc } from '../view/Doc';
import { Section } from '../view/Section';
interface ContextOptions {
    type: 'page' | 'cell';
    doc: Doc;
    section?: Section;
    page?: Page;
    cell?: TableCell;
    paragraph?: PageChild;
    layoutRun?: LayoutNode;
}
export declare class LayoutContext {
    type: ContextOptions['type'];
    doc: Doc;
    section?: Section;
    page?: Page;
    cell?: TableCell;
    paragraph?: PageChild;
    layoutRun?: LayoutNode;
    modelRef?: {
        id: string;
    };
    constructor(options: ContextOptions);
    get container(): Page | TableCell;
    updateSection(section: Section): void;
    updatePage(page: Page): void;
    updateParagraph(paragraph: PageChild): void;
    ensureCellParagraphSpace(itemWidth: number): void;
    ensurePageParagraphSpace(itemWidth: number, itemHeight: number): void;
    ensureParagraphSpace(itemWidth: number, itemHeight: number): void;
    createNewPage(payload?: Partial<PageOptions>): Page;
    createNewParagraph(y?: number): Paragraph;
    resetModelRef(id: string): void;
    getRunX(): number;
    addRun(run: LayoutNode): void;
    /**
     * 根据 dataIndex 替换 path 中的 [n] 为实际值
     * @param path 包含 [n] 的路径，如 "$.items[n].name"
     * @returns 替换后的路径，如 "$.items[0].name"，若无 dataIndex 则返回 undefined
     */
    getValuePath(path: string): string | undefined;
}
export {};
