import * as Y from 'yjs';
import EventEmitter from 'eventemitter3';
import { PageModel } from './model/PageModel';
import { WhiteboardPermissionFlag } from './WhitePermissions';
export interface IndexedNavigationEvents {
    /**
     * 当前页索引发生变化时触发
     * @param pageIndex
     */
    activePageChange: (pageIndex: number) => void;
    /**
     * 总页数发生变化时触发
     * @param pageCount 总页数
     */
    pageCountChange: (pageCount: number) => void;
}
export declare class IndexedNavigation extends EventEmitter<IndexedNavigationEvents> {
    private idPool;
    private pageModel;
    private userMap;
    private indexedPageMap;
    private list;
    private hasPermission;
    private get idList();
    private get head();
    private get lastNodeId();
    constructor(pageModel: PageModel, userMap: Y.Map<any>, indexedPageMap: Y.Map<{
        prev: string;
        next: string;
    }>, hasPermission: (flag: WhiteboardPermissionFlag) => boolean);
    private getNextId;
    initIndexed(): Promise<boolean>;
    private handleIndexedPageMapUpdate;
    /**
       * 获取总页数
       * @returns {number}
       */
    get pageCount(): number;
    /**
       * 获取当前页索引
       */
    get currentPageIndex(): number;
    get currentPageId(): string;
    private getPageIndex;
    /**
       * 获取指定索引对应的 pageId
       * @param {number} index
       */
    getPageId(index: number): string | null;
    private modifyDetect;
    /**
       * 在尾部插入新页面
       * @param {boolean=} goto 是否跳转到新页面, 默认 true
       * @return 总页数
       */
    pushPage(goto?: boolean): number;
    /**
       * 在 after 之后插入新页面
       * @param {number} after 在此页之后插入
       * @param {boolean=} goto 是否跳转到新页面, 默认 true
       * @return 总页数
       */
    insertPage(after: number, goto?: boolean): number;
    /**
       * 跳转至上一页, 并返回跳转后的页面索引.
       */
    prevPage(): number;
    /**
       * 跳转至下一页, 并返回跳转后的页面索引.
       */
    nextPage(): number;
    /**
       * 删除指定页面
       * @param {number} index
       */
    removePage(index: number): number;
    gotoPage(index: number): void;
    dispose(): void;
}
//# sourceMappingURL=IndexedNavigation.d.ts.map