import { Page, PageChild, PageOptions } from '../view/Page';
import { Paragraph } from '../view/Paragraph';
import { BandContainer, LayoutNode } from '../view/base';
import { TableCell } from '../view/TableCell';
import { Doc } from '../view/Doc';
import { Section } from '../view/Section';
import { OverlayLayout } from '../view/base/OverlayLayout';
interface ContextOptions {
    type: 'page' | 'cell' | 'header' | 'footer' | 'overlayLayout';
    doc: Doc;
    section?: Section;
    page?: Page;
    cell?: TableCell;
    paragraph?: PageChild;
    layoutRun?: LayoutNode;
    current?: OverlayLayout;
    onPageCreated?: (page: Page) => void;
}
export declare class LayoutContext {
    type: ContextOptions['type'];
    doc: Doc;
    section?: Section;
    page?: Page;
    cell?: TableCell;
    paragraph?: PageChild;
    layoutRun?: LayoutNode;
    current?: OverlayLayout;
    modelRef?: {
        id: string;
    };
    onPageCreated?: (page: Page) => void;
    /** 当前 section 内的页码 */
    constructor(options: ContextOptions);
    get container(): Page | TableCell | BandContainer | OverlayLayout;
    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;
    insertLineBreak(): void;
    createNewPage(payload?: Partial<PageOptions>): Page;
    createNewParagraph(y?: number): Paragraph;
    resetModelRef(id: string): void;
    getRunX(): number;
    /**
     * 获取当前行剩余的空间
     */
    getParagraphRemainingSize(): 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 {};
