import { RTEBlock } from '../../dto/blocks/block.abstract';
import { RTENode } from '../../dto/nodes/node.abstract';
import { Nullable } from '../../../../types/general';
import type { VegaRTEContent } from '../../dto/content-state';
/**
 * This class is responsible for keeping track of the DOM elements and their corresponding entities.
 */
declare class StateEntityRenderingRegistry {
  domToEntity: WeakMap<HTMLElement, RTEBlock | RTENode>;
  entityToDOM: WeakMap<RTEBlock | RTENode, HTMLElement>;
  contentEntityToRootDom: Map<VegaRTEContent, HTMLElement>;
  private rootDomToContentEntity;
  /**
   * Registers a DOM element and its corresponding entity.
   *
   * @param {HTMLElement} dom The DOM element to register.
   * @param {RTEBlock | RTENode | VegaRTEContent} entity The entity to register.
   */
  register(dom: HTMLElement, entity: RTEBlock | RTENode | VegaRTEContent): void;
  /**
   * Retrieves the entity corresponding to a DOM element.
   *
   * @param {HTMLElement} dom The DOM element to retrieve the entity for.
   * @returns {Nullable<RTEBlock | RTENode>} The entity corresponding to the DOM element, or null if not found.
   */
  getEntityByDOM(dom: HTMLElement): Nullable<RTEBlock | RTENode>;
  /**
   * Retrieves the DOM element corresponding to an entity.
   *
   * @param {RTEBlock | RTENode} entity The entity to retrieve the DOM element for.
   * @returns {Nullable<HTMLElement>} The DOM element corresponding to the entity, or null if not found.
   */
  getDOMByEntity(entity: RTEBlock | RTENode | VegaRTEContent): Nullable<HTMLElement>;
  /**
   * Delete the dirty element to entity ref.
   *
   * @example Convert text node to the link node, the old span will change to the link wrapper element, and there will be a new text span, so we need remove the old span ref from the map.
   * @param {HTMLElement} dom - The dirty element ref.
   */
  removeDirtyDomRef(dom: HTMLElement): void;
  /**
   * Bind the root dom ref and content entity.
   *
   * @param {HTMLElement} dom - The vega rich text editor ref.
   * @param {VegaRTEContent} contentEntity - The rich text editor value content.
   */
  private registerRootDomAndContentEntity;
  /**
   * Check the entity is VegaRTEContent instance.
   *
   * @param {VegaRTEContent | RTEBlock | RTENode} entity - The entity to check.
   * @returns {entity is VegaRTEContent} - True if the entity is a VegaRTEContent instance, false otherwise.
   */
  private isVegaRTEContent;
}
declare const _default: StateEntityRenderingRegistry;
export default _default;
