import EventEmitter from 'eventemitter3';
import * as Y from 'yjs';
import { UserManager } from '@netless/forge-room';
import { WhiteboardPermissionFlag } from '../WhitePermissions';
export interface PageEvents {
    /**
     * 页面列表发生变化时触发
     * @param {string[]} ids 页面 id 列表
     */
    pagesChange: (ids: string[]) => void;
    /**
     * 页面切换后触发
     * @param {string} id 当前页 id
     */
    switchPage: (id: string) => void;
}
export declare class PageModel extends EventEmitter<PageEvents> {
    private whiteboardAttrsMap;
    private pageMap;
    private requestUserMap;
    private userManager;
    private observers;
    private hasPermission;
    constructor(whiteboardAttrsMap: Y.Map<any>, userManager: UserManager, requestUserMap: (userId: string) => Y.Map<any>, pageMap: Y.Map<string>, hasPermission: (flag: WhiteboardPermissionFlag) => boolean);
    private createCurrentPageObserver;
    private handleUserLeave;
    private handleUserJoin;
    private handleMainPageChange;
    private handleUserCurrentPageChange;
    private handlePageMapChange;
    getCurrentPage(userId: string): string | null;
    pageList(): string[];
    private modifyDetect;
    addPage(id: string, focus?: boolean): boolean;
    deletePage(id: string, replace?: string): void;
    setUserPage(id: string, userId: string): void;
    gotoPage(id: string): void;
    dispose(): void;
}
//# sourceMappingURL=PageModel.d.ts.map