import { CommandManager } from '../command/CommandManager';
import { Page } from './Page';
import { Section } from './Section';
import { LayoutManager } from '../layout/LayoutManager';
import { LayoutMapper } from '../layout/LayoutMapper';
import { CursorManager } from '../cursor/CursorManager';
import { EventManager } from '../event/EventManager';
import { DataManager } from '../data/DataManager';
import { InteractionManager } from '../interaction/InteractionManager';
import { DocModeType } from '../constants';
import { CommandPayloadMap, RequiredPayloadCommands, OptionalPayloadCommands } from '../command/types';
import { DocModel } from '../model';
export interface DocInitOptions {
    mode?: DocModeType;
    model?: DocModel;
    mainModelKey: ModelKey;
    pageSize?: {
        width: number;
        height: number;
    };
    pagePadding?: [number, number, number, number];
    onLayoutChange?: (doc: Doc) => void;
    onSelectionChange?: (doc: Doc) => void;
}
export declare class Doc {
    id: string;
    mode: DocModeType;
    model?: DocModel;
    sections: Section[];
    pages: Page[];
    commandManager: CommandManager;
    layoutManager: LayoutManager;
    layoutMapper: LayoutMapper;
    cursorManager: CursorManager;
    eventManager: EventManager;
    dataManager: DataManager;
    interactionManager: InteractionManager;
    pageSize: {
        width: number;
        height: number;
    };
    pagePadding: [number, number, number, number];
    /** 当前表单主模型 key */
    mainModelKey: string;
    /** 安全距离-上下 */
    SAFE_DIST_Y: number;
    /** 安全距离-左右 */
    SAFE_DIST_X: number;
    /** 纸张之间的间距 */
    PAGE_GAP: number;
    /** 缩放值 */
    scale: number;
    /** 每页的偏移量 */
    pageOffsets: {
        [k: string]: {
            top: number;
            left: number;
        };
    };
    /** 最大的纸张宽度(带安全距离) */
    pageMaxWidth: number;
    /** UI 变更计数器 */
    private _updateTick;
    onLayoutChange?: (doc: Doc) => void;
    onSelectionChange?: (doc: Doc) => void;
    constructor(options: DocInitOptions);
    get updateTick(): number;
    get modeLabel(): "" | "设计模式" | "填报模式" | "打印模式";
    getFirstPage(): Page | null;
    getLastPage(): Page | null;
    setModel(model: DocModel): void;
    /** 触发布局计算 */
    layout(): void;
    /** 渲染文档 */
    render(): void;
    /**
     * 执行命令 - 必须提供 payload 的命令
     */
    execute<T extends RequiredPayloadCommands>(name: T, payload: CommandPayloadMap[T]): void;
    /**
     * 执行命令 - payload 可选的命令
     */
    execute<T extends OptionalPayloadCommands>(name: T, payload?: CommandPayloadMap[T]): void;
    undo(): void;
    redo(): void;
    /** 销毁文档 */
    destroy(): void;
    hasPage(page: Page): boolean;
    addPage(page: Page): Page | undefined;
    /** 是否是设计模式 */
    isInEditMode(): boolean;
    /** 是否是填报模式 */
    isInFillMode(): boolean;
    /** 是否是打印模式 */
    isInPrintMode(): boolean;
    bumpUpdateTick(): void;
}
