import { RTETextBlock } from '../../../../dto/blocks/text-block';
import { VegaRTEContent } from '../../../../dto/content-state';
import { RTENode } from '../../../../dto/nodes/node.abstract';
import { SelectionController } from '../../selection-controller';
/** This code snippet is defining an abstract class named `BaseHandler` with an abstract method `execute`. */
export declare abstract class BaseHandler {
  protected currentState: VegaRTEContent;
  protected selectionController: SelectionController;
  protected richTextEditorRef: HTMLVegaRichTextEditorElement;
  /**
   * The function `execute` initializes the current state and selection, and then handles an event if provided.
   *
   * @param {VegaRTEContent} currentState - The current state of the VegaRTE content.
   * @param {SelectionController} selectionController - Manages the selection of items in the user interface.
   * @param {HTMLElement} richTextEditor - The current rich text editor component
   * @param {InputEvent} [event] - It is used to pass an input event to the method for handling.
   */
  execute(currentState: VegaRTEContent, selectionController: SelectionController, richTextEditor: HTMLVegaRichTextEditorElement, event?: InputEvent): void;
  /**
   * The function `isRootContainer` checks if an HTML element is a root container with a class of 'rich-text-content'.
   *
   * @param {HTMLElement} element - HTMLElement
   * @returns {boolean} The boolean value
   */
  protected isRootContainer(element: HTMLElement): boolean;
  /**
   * Checks if a given HTML element represents an empty paragraph containing only a line break element.
   *
   * @param {HTMLElement} node - An HTMLElement node that represents a paragraph element in the HTML document.
   * @returns {boolean} boolean result
   */
  protected isEmptyParagraph(node: HTMLElement): boolean;
  /**
   * Removes selected nodes within a range in a rich text editor content.
   * The method is only used for different nodes are selected
   *
   * @param {boolean} [mergeNode] Merge start node and end node or not, default value is false.
   * @returns {RTENode} The range start node, usually the start node is the first item of selectedNodes, if the selectedNodes is all removed, the start node will be a new text node.
   */
  protected removeSelectionRange(mergeNode?: boolean): RTENode;
  /**
   * Creates a new paragraph with an empty text node and returns it.
   *
   * @returns {RTETextBlock} An empty paragraph with a unique identifier and a text node appended to it.
   */
  protected createEmptyParagraph(): RTETextBlock;
  /**
   * The function initializes the current state and selection controller in TypeScript.
   *
   * @param {VegaRTEContent} currentState - The current state of a Vega runtime environment content.
   * @param {SelectionController} selectionController - It is used to manage the selection of content within the VegaRTE editor.
   */
  private initCurrentStateAndSelection;
  /**
   * Queries the rich text editor element from the input event target.
   *
   * @param {HTMLElement} richTextEditor - The current rich text editor component
   */
  private setCurrentRichTextEditor;
  abstract handleEvent(event?: InputEvent): void;
}
