/** @typedef {import('./types').User} User */
/** @typedef {import('./types').TelemetryConfig} TelemetryConfig */
/** @typedef {import('./types').Document} Document */
/** @typedef {import('./types').Modules} Modules */
/** @typedef {import('./types').Editor} Editor */
/** @typedef {import('./types').DocumentMode} DocumentMode */
/** @typedef {import('./types').Config} Config */
/** @typedef {import('./types').ExportParams} ExportParams */
/**
 * SuperDoc class
 * Expects a config object
 *
 * @class
 * @extends EventEmitter
 */
export class SuperDoc extends EventEmitter<string | symbol, any> {
    /** @type {Array<string>} */
    static allowedTypes: Array<string>;
    /**
     * @param {Config} config
     */
    constructor(config: Config);
    /** @type {string} */
    version: string;
    /** @type {User[]} */
    users: User[];
    /** @type {import('yjs').Doc | undefined} */
    ydoc: import("yjs").Doc | undefined;
    /** @type {import('@hocuspocus/provider').HocuspocusProvider | undefined} */
    provider: import("@hocuspocus/provider").HocuspocusProvider | undefined;
    /** @type {Config} */
    config: Config;
    userColorMap: Map<any, any>;
    colorIndex: number;
    superdocId: any;
    colors: string[];
    user: import("./types").User;
    socket: any;
    isDev: boolean;
    activeEditor: {
        setHighContrastMode: (value: any) => void;
        get docChanged(): boolean;
        mount(el: any): void;
        unmount(): void;
        view: any;
        setToolbar(toolbar: any): void;
        toolbar: any;
        focus(): void;
        get state(): any;
        get storage(): any;
        readonly commands: any;
        readonly helpers: EditorHelpers;
        get isEditable(): boolean;
        get isDestroyed(): boolean;
        get element(): HTMLElement;
        get users(): Array<User>;
        chain(): any;
        can(): any;
        setDocumentMode(documentMode: string, caller: string): void;
        generateCollaborationUpdate(): Promise<Uint8Array>;
        initializeCollaborationData(): void;
        replaceContent(content: object): void;
        setOptions(options?: EditorOptions): void;
        options: any;
        setEditable(editable?: boolean, emitUpdate?: boolean): void;
        registerPlugin(plugin: any, handlePlugins: any): void;
        unregisterPlugin(nameOrPluginKey: string | any): void;
        getSchemaSummaryJSON(): Promise<any>;
        validateJSON(doc2: any): any;
        createNodeViews(): void;
        getMaxContentSize(): any;
        updateEditorStyles(element: any, proseMirror: any, hasPaginationEnabled?: boolean): void;
        initDefaultStyles(element?: HTMLElement, isPaginationEnabled?: boolean): void;
        initMobileStyles(element: HTMLElement | void): void;
        getDocumentIdentifier(): Promise<string>;
        getDocumentGuid(): string | null;
        isDocumentModified(): boolean;
        getTelemetryData(): Promise<{
            documentId: string;
            isModified: boolean;
            isPermanentId: boolean;
            version: any;
        }>;
        getDocumentId(): string;
        getAttributes(nameOrType: string): any;
        isActive(nameOrAttributes: string | any, attributesOrUndefined?: any): boolean;
        getJSON(): any;
        getMetadata(): {
            documentGuid: string | null;
            isModified: boolean;
            version: string | null;
        };
        getHTML({ unflattenLists }?: {
            unflattenLists?: boolean;
        }): string;
        getMarkdown(): Promise<string>;
        getDocumentVersion(): string | null;
        createChildEditor(options: EditorOptions): {
            new (options: EditorOptions): /*elided*/ any;
            loadXmlData(fileSource: File | Blob | Buffer, isNode2?: boolean): Promise<any[]>;
            getDocumentVersion(doc2: any): string;
            setDocumentVersion(doc2: any, version2: any): string;
            getDocumentGuid(doc2: any): string | null;
            updateDocumentVersion(doc2: any, version2: any): string;
            checkIfMigrationsNeeded(): boolean;
        };
        getPageStyles(): any;
        updatePageStyle({ pageMargins }: {
            pageMargins: any;
        }): void;
        migrateListsToV2(): any[];
        getUpdatedJson(): any;
        exportDocx({ isFinalDoc, commentsType, exportJsonOnly, exportXmlOnly, comments, getUpdatedDocs, fieldsHighlightColor }?: {
            isFinalDoc?: boolean;
            commentsType?: string;
            comments?: any[];
            getUpdatedDocs?: boolean;
        }): Promise<Blob | ArrayBuffer | any>;
        destroy(): void;
        destroyHeaderFooterEditors(): void;
        processCollaborationMigrations(): any | void;
        replaceFile(newFile: any): Promise<void>;
        getInternalXmlFile(name: string, type?: string): any | string;
        updateInternalXmlFile(name: string, updatedContent: string): void;
        getNodesOfType(type: string): any[];
        replaceNodeWithHTML(targetNode: any, html: string): void;
        prepareForAnnotations(annotationValues?: FieldValue[]): void;
        migrateParagraphFields(annotationValues?: FieldValue[]): Promise<FieldValue[]>;
        annotate(annotationValues?: FieldValue[], hiddenIds?: string[], removeEmptyFields?: boolean): void;
        previewAnnotations(annotationValues?: any[], hiddenIds?: string[]): void;
        originalState: any;
        closePreview(): void;
        on(name: string, fn2: any): void;
        emit(name: string, ...args: any[]): void;
        off(name: string, fn2: any): void;
        once(name: string, fn2: any): void;
        removeAllListeners(): void;
    };
    comments: any[];
    readyEditors: number;
    isLocked: boolean;
    lockedBy: import("./types").User;
    /**
     * Get the number of editors that are required for this superdoc
     * @returns {number} The number of required editors
     */
    get requiredNumberOfEditors(): number;
    get state(): {
        documents: any;
        users: import("./types").User[];
    };
    /**
     * Get the SuperDoc container element
     * @returns {HTMLElement | null}
     */
    get element(): HTMLElement | null;
    app: any;
    pinia: any;
    superdocStore: any;
    commentsStore: any;
    highContrastModeStore: any;
    isCollaborative: boolean;
    /**
     * Add a user to the shared users list
     * @param {Object} user The user to add
     * @returns {void}
     */
    addSharedUser(user: any): void;
    /**
     * Remove a user from the shared users list
     * @param {String} email The email of the user to remove
     * @returns {void}
     */
    removeSharedUser(email: string): void;
    telemetry: Telemetry;
    /**
     * Triggered when there is an error in the content
     * @param {Object} param0
     * @param {Error} param0.error The error that occurred
     * @param {Editor} param0.editor The editor that caused the error
     */
    onContentError({ error, editor }: {
        error: Error;
        editor: Editor;
    }): void;
    /**
     * Triggered when the PDF document is ready
     * @returns {void}
     */
    broadcastPdfDocumentReady(): void;
    /**
     * Triggered when the superdoc is ready
     * @returns {void}
     */
    broadcastReady(): void;
    /**
     * Triggered before an editor is created
     * @param {Editor} editor The editor that is about to be created
     * @returns {void}
     */
    broadcastEditorBeforeCreate(editor: Editor): void;
    /**
     * Triggered when an editor is created
     * @param {Editor} editor The editor that was created
     * @returns {void}
     */
    broadcastEditorCreate(editor: Editor): void;
    /**
     * Triggered when an editor is destroyed
     * @returns {void}
     */
    broadcastEditorDestroy(): void;
    /**
     * Triggered when the comments sidebar is toggled
     * @param {boolean} isOpened
     */
    broadcastSidebarToggle(isOpened: boolean): void;
    /**
     * Set the active editor
     * @param {Editor} editor The editor to set as active
     * @returns {void}
     */
    setActiveEditor(editor: Editor): void;
    /**
     * Toggle the ruler visibility for SuperEditors
     *
     * @returns {void}
     */
    toggleRuler(): void;
    /**
     * Toggle pagination for SuperEditors
     * @returns {void}
     */
    togglePagination(): void;
    /**
     * Determine whether the current configuration allows a given permission.
     * Used by downstream consumers (toolbar, context menu, commands) to keep
     * tracked-change affordances consistent with customer overrides.
     *
     * @param {Object} params
     * @param {string} params.permission Permission key to evaluate
     * @param {string} [params.role=this.config.role] Role to evaluate against
     * @param {boolean} [params.isInternal=this.config.isInternal] Internal/external flag
     * @param {Object|null} [params.comment] Comment object (if already resolved)
     * @param {Object|null} [params.trackedChange] Tracked change metadata (id, attrs, etc.)
     * @returns {boolean}
     */
    canPerformPermission({ permission, role, isInternal, comment, trackedChange, }?: {
        permission: string;
        role?: string;
        isInternal?: boolean;
        comment?: any | null;
        trackedChange?: any | null;
    }): boolean;
    toolbarElement: any;
    toolbar: SuperToolbar;
    /**
     * Add a comments list to the superdoc
     * Requires the comments module to be enabled
     * @param {Element} element The DOM element to render the comments list in
     * @returns {void}
     */
    addCommentsList(element: Element): void;
    commentsList: SuperComments;
    /**
     * Remove the comments list from the superdoc
     * @returns {void}
     */
    removeCommentsList(): void;
    /**
     * Triggered when a toolbar command is executed
     * @param {Object} param0
     * @param {Object} param0.item The toolbar item that was clicked
     * @param {string} param0.argument The argument passed to the command
     */
    onToolbarCommand({ item, argument }: {
        item: any;
        argument: string;
    }): void;
    /**
     * Set the document mode.
     * @param {DocumentMode} type
     * @returns {void}
     */
    setDocumentMode(type: DocumentMode): void;
    /**
     * Search for text or regex in the active editor
     * @param {string | RegExp} text The text or regex to search for
     * @returns {Object[]} The search results
     */
    search(text: string | RegExp): any[];
    /**
     * Go to the next search result
     * @param {Object} match The match object
     * @returns {void}
     */
    goToSearchResult(match: any): void;
    /**
     * Set the document to locked or unlocked
     * @param {boolean} lock
     */
    setLocked(lock?: boolean): void;
    /**
     * Get the HTML content of all editors
     * @returns {Array<string>} The HTML content of all editors
     */
    getHTML(options?: {}): Array<string>;
    /**
     * Lock the current superdoc
     * @param {Boolean} isLocked
     * @param {User} lockedBy The user who locked the superdoc
     */
    lockSuperdoc(isLocked: boolean, lockedBy: User): void;
    /**
     * Export the superdoc to a file
     * @param {ExportParams} params - Export configuration
     * @returns {Promise<void | Blob>}
     */
    export({ exportType, commentsType, exportedName, additionalFiles, additionalFileNames, isFinalDoc, triggerDownload, fieldsHighlightColor, }?: ExportParams): Promise<void | Blob>;
    /**
     * Export editors to DOCX format.
     * @param {{ commentsType?: string, isFinalDoc?: boolean }} [options]
     * @returns {Promise<Array<Blob>>}
     */
    exportEditorsToDOCX({ commentsType, isFinalDoc, fieldsHighlightColor }?: {
        commentsType?: string;
        isFinalDoc?: boolean;
    }): Promise<Array<Blob>>;
    pendingCollaborationSaves: number;
    /**
     * Save the superdoc if in collaboration mode
     * @returns {Promise<void[]>} Resolves when all documents have saved
     */
    save(): Promise<void[]>;
    /**
     * Destroy the superdoc instance
     * @returns {void}
     */
    destroy(): void;
    /**
     * Focus the active editor or the first editor in the superdoc
     * @returns {void}
     */
    focus(): void;
    /**
     * Set the high contrast mode
     * @param {boolean} isHighContrast
     * @returns {void}
     */
    setHighContrastMode(isHighContrast: boolean): void;
    #private;
}
export type User = import("./types").User;
export type TelemetryConfig = import("./types").TelemetryConfig;
export type Document = import("./types").Document;
export type Modules = import("./types").Modules;
export type Editor = import("./types").Editor;
export type DocumentMode = import("./types").DocumentMode;
export type Config = import("./types").Config;
export type ExportParams = import("./types").ExportParams;
import { EventEmitter } from 'eventemitter3';
import { Telemetry } from '@superdoc/common/Telemetry';
import { SuperToolbar } from '@harbour-enterprises/super-editor';
import { SuperComments } from '../components/CommentsLayer/commentsList/super-comments-list.js';
//# sourceMappingURL=SuperDoc.d.ts.map