/**
* @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
*/
/**
* @module revision-history/revisionviewer
*/
import { Plugin, Command, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
import { ContextualBalloon } from "@ckeditor/ckeditor5-ui";
import { Users } from "@ckeditor/ckeditor5-collaboration-core";
import { ChangeDetailsView } from "./ui/revisionviewer/changedetailsview.js";
import { RevisionsRepository } from "./revisionsrepository.js";
import { RevisionHistoryUtils } from "./revisionhistoryutils.js";
import { ChangeItem } from "./changeitem.js";
import { RevisionDiff } from "./revisiondiff.js";
import "../theme/revisionviewer.css";
import type { Revision, RevisionJSON } from "./revision.js";
export declare class RevisionViewer extends Plugin {
	repository: RevisionsRepository;
	/**
	* @observable
	*/
	activeChange: ChangeItem | null;
	/**
	* @observable
	*/
	activeView: ChangeDetailsView | null;
	/**
	* @observable
	*/
	diff: RevisionDiff | null;
	/**
	* @observable
	*/
	isReady: boolean;
	/**
	* @observable
	*/
	isEnabled: boolean;
	/**
	* @observable
	*/
	isNavigationMode: boolean;
	/**
	* @observable
	*/
	currentChangeNumber: number;
	/**
	* @observable
	*/
	numberOfChanges: number;
	static get pluginName(): "RevisionViewer";
	/**
	* @inheritDoc
	*/
	static override get isOfficialPlugin(): true;
	/**
	* @inheritDoc
	*/
	static override get isPremiumPlugin(): true;
	static get requires(): PluginDependenciesOf<[Users, ContextualBalloon, RevisionsRepository, RevisionHistoryUtils]>;
	constructor(editor: Editor);
	init(): void;
	/**
	* Returns document data for given revision.
	*
	* The document data is HTML or a different format, depending on the editor configuration.
	*
	* This method returns a promise which resolves with an object, where keys are root names and values are these roots' data. Most
	* editor setups use just one root, which has the default name `main`. In this case, the promise will resolve with an object
	* similar to this:
	*
	* ```ts
	* { main: "<p>Sample document data.</p>" }
	* ```
	*
	* If the adapter integration is used, this method will automatically load necessary
	* {@link module:revision-history/revision~Revision#diffData `Revision#diffData`} if it is missing.
	*
	* Please note, that the data returned by this method uses
	* {@link module:engine/dataprocessor/dataprocessor~DataProcessor#useFillerType marked fillers mode}. This means that some `&nbsp;`
	* characters in the returned data may be wrapped with `<span data-cke-filler="true">&nbsp;</span>`. Take this difference into
	* consideration if you plan to compare revision data with the data returned by `editor.getData()`.
	*
	* See also {@link module:revision-history/revisionviewer~RevisionViewer#getRevisionRootsAttributes}.
	*/
	getRevisionDocumentData(revision: Revision): Promise<Record<string, string>>;
	/**
	* Returns roots attributes for given revision.
	*
	* This method returns a promise which resolves with an object, where keys are root names and values are these roots' attributes.
	* Most editor setups use just one root, which has the default name `main`. In this case, the promise will resolve with an object
	* similar to this:
	*
	* ```ts
	* { main: {} }
	* ```
	*
	* See also {@link module:revision-history/revisionviewer~RevisionViewer#getRevisionDocumentData}.
	*/
	getRevisionRootsAttributes(revision: Revision): Promise<Record<string, Record<string, unknown>>>;
	compare(newRevisionOrId: Revision | string, oldRevisionOrId: Revision | string, forceCompare?: boolean): Promise<unknown>;
	addRevisionData(revisionData: RevisionJSON, updateCallback: (updateObj: RevisionJSON, isFromAdapter: boolean, revision: Revision) => void): Revision;
	private _removeMissingPairs;
}
export declare class RestoreRevisionCommand extends Command {
	constructor(editor: Editor);
	override execute(): void;
	override refresh(): void;
}
export declare class ShowChangeCommand<T extends "backward" | "forward"> extends Command {
	constructor(editor: Editor, { direction }: {
		direction: T;
	});
	/**
	* TODO
	*/
	override execute(): void;
	/**
	* TODO
	*
	* The `showNextChange` command is enabled if the revision viewer is ready and either the navigation
	* mode is off, or there is any "next" change to select within current revision.
	*
	* The `showPreviousChange` command is enabled if the revision viewer is ready and either the navigation
	* mode is off, or there is any "previous" change to select within current revision.
	*/
	override refresh(): void;
}
