/**
 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
 */
import type { Editor, ContextWatchdog, EditorConfig } from 'ckeditor5';
/**
 * An adapter aligning the context watchdog API to the editor watchdog API for easier usage.
 */
export declare class EditorWatchdogAdapter<TEditor extends Editor> {
    /**
     * The context watchdog instance that will be wrapped into editor watchdog API.
     */
    private readonly _contextWatchdog;
    /**
     * A unique id for the adapter to distinguish editor items when using the context watchdog API.
     */
    private readonly _id;
    /**
     * A watchdog's editor creator function.
     */
    private _creator?;
    /**
     * @param contextWatchdog The context watchdog instance that will be wrapped into editor watchdog API.
     */
    constructor(contextWatchdog: ContextWatchdog);
    /**
     *  @param creator A watchdog's editor creator function.
     */
    setCreator(creator: AdapterEditorCreatorFunction<TEditor>): void;
    /**
     * Adds an editor configuration to the context watchdog registry. Creates an instance of it.
     *
     * @param sourceElementOrData A source element or data for the new editor.
     * @param config CKEditor 5 editor config.
     */
    create(sourceElementOrData: HTMLElement | string, config: EditorConfig): Promise<unknown>;
    create(config: EditorConfig): Promise<unknown>;
    /**
     * Creates a listener that is attached to context watchdog's item and run when the context watchdog fires.
     * Currently works only for the `error` event.
     */
    on(_: string, callback: (_: null, data: {
        error: Error;
        causesRestart?: boolean;
    }) => void): void;
    destroy(): Promise<unknown>;
    /**
     * An editor instance.
     */
    get editor(): TEditor;
}
type AdapterEditorCreatorFunction<TEditor = Editor> = ((config: EditorConfig) => Promise<TEditor>) | ((elementOrData: HTMLElement | string | Record<string, string> | Record<string, HTMLElement>, config: EditorConfig) => Promise<TEditor>);
export {};
