import { AbstractApplication } from '@netless/forge-room';
import { ToolbarModel, ToolbarStyle } from './model/ToolbarModel';
import { Whiteboard } from './Whiteboard';
/**
 * 白板启动配置, 同一个房间中不同客户端应使用一致的启动配置项, 推荐直接硬编码在代码中
 */
export interface WhiteboardOption {
    /**
     * 白板可视区域宽度, 如果各客户端配置不一致则会导致可视区域不同步
     */
    width: number;
    /**
     * 白板可视区域高度, 如果各客户端配置不一致则会导致可视区域不同步
     */
    height: number;
    /**
     * 白板区域最大缩放比例, 如果各客户端配置不一致则会导致可视区域不同步
     * 参数必须大于等于 1, 或者 -1, -1 表示无边界.
     * @default -1
     */
    maxScaleRatio?: number;
    /**
     * 默认工具栏样式, 如果各客户端配置不一致则随机应用其中一个值
     */
    defaultToolbarStyle?: Partial<ToolbarStyle>;
    /**
     * 忽略宽高比, 白板可绘制区域会撑满容器. 此模式如果开启, 会忽略 WhiteboardOption.width 和 WhiteboardOption.height
     */
    stretchToFill?: boolean;
    /**
     * 是否开启性能模式, 开启后会关闭部分影响性能的功能, 例如实时同步画笔路径. 默认 false
     */
    performance?: boolean;
}
export declare const WHITEBOARD_APP_NAME = "whiteboard";
export type WhiteboardToolType = 'curve' | 'rectangle' | 'selector' | 'line' | 'arrow' | 'text' | 'ellipse' | 'triangle' | 'eraser' | 'laser' | 'grab' | 'pointer';
interface SyncedWhiteboardStatus {
    currentTool: WhiteboardToolType;
    strokeColor: string;
    fillColor: string | null;
    fontSize: number;
    fontFamily: string;
    strokeWidth: number;
    dashArray: number[];
    permission: number;
}
interface WhiteboardMap {
    get(key: string): Promise<SyncedWhiteboardStatus | undefined>;
    set(key: string, value: SyncedWhiteboardStatus): void;
}
declare global {
    interface Window {
        __forge_gl_wb_status__: WhiteboardMap;
    }
}
export declare class WhiteboardApplication extends AbstractApplication<WhiteboardOption, Whiteboard> {
    static instanceCount: Map<string, number>;
    static applicationName: string;
    readonly name: string;
    emitter: Whiteboard;
    toolbarModel: ToolbarModel;
    private selectElementsModel;
    private trashedElementsModel;
    private pageModel;
    private layers;
    private undoManagers;
    private imageSets;
    private rootElement;
    private paperScope;
    private canvasElement;
    private shadowScope;
    private snapshotCanvasElement;
    private snapshotScope;
    private shadowCanvasElement;
    private shadowEmitter;
    private tools;
    private editors;
    private camera;
    private resizeObserver;
    private option;
    private permissions;
    private inputType;
    private isPenEvent;
    private activePenPointerId;
    private hasPenInput;
    private disableViewModelUpdate;
    private internalResizeObserver;
    private sequenceExecutor;
    private linkWhiteboardId;
    private liveCursor;
    private delayTranslateOut;
    private get undoManager();
    private get viewportWidth();
    private get viewportHeight();
    constructor();
    private addWhiteboardStatus;
    addPage(id: string, focus?: boolean): boolean;
    private userMap;
    private enableToolEvent;
    initialize(option: WhiteboardOption): Promise<void>;
    private handleWritableChanged;
    private handleViewportUpdate;
    private handleElementTranslateOut;
    private handlePageSwitch;
    private hasPermission;
    private isPerformanceMode;
    private handleStackItemAdded;
    private handleStackItemPopped;
    private handleLayersChange;
    private clearElements;
    private getCurrentRendererModel;
    private handleElementClear;
    private findElementIndex;
    private handleElementInsert;
    private insertElementToParent;
    private handleElementRemove;
    private handleRemoveTrashedElementForSelf;
    private handleElementsTrash;
    private handleElementsSelect;
    private ensureScale;
    private rasterize;
    disableViewModel(): void;
    linkToWhiteboard(targetId: string): void;
    unlink(): void;
    private handleSyncedWhiteboardStatusChange;
    adjustByOutFrame: (frameWidth: number, frameHeight: number) => void;
    setViewSize(width: number, height: number): void;
    getViewSize(): [number, number];
    getInherentScale(): number;
    updateInternalResizeObserverStatus(value: boolean): void;
    updateOptionSize(width: number, height: number): void;
    dispose(removeSubDoc: boolean): Promise<void>;
}
export {};
//# sourceMappingURL=WhiteboardApplication.d.ts.map