import { BaseRenderer } from '../../../helpers/rte-manager/dto-renderer-manager';
import { Nullable } from '../../../types/general';
import { RTEBlock } from '../dto/blocks/block.abstract';
import { RTENode } from '../dto/nodes/node.abstract';
import { VegaRTEBaseRenderer } from '../dto/renderers/base-renderer';
import { RTEExtensionContext, RTERenderContext, VegaRTECreateElementFunction, VegaRTERenderResult } from '../interface';
declare type VegaRTEUseRef = (element: HTMLElement) => void;
/**
 * Base renderer for Vega Rich Text Editor.
 */
export declare abstract class VegaRTEExtensionRenderer extends VegaRTEBaseRenderer<RTEBlock | RTENode, VegaRTERenderResult> {
  static REGISTER_REF_FLAG: string;
  /**
   * Returns the styles to be injected into the RTE scope.
   * Override this method to provide custom styles for the custom blocks or nodes.
   *
   * @returns {string} - The styles as a string.
   */
  injectRTEScopeStyles(): string;
  /**
   * Renders the given data as a DOM element.
   *
   * @param {RTEBlock | RTENode} renderData - The data to render, which can be a block or a node.
   * @param {RTERenderContext} rteContext - The rte editor context.
   * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
   * @returns {VegaRTERenderResult} - The rendered DOM element.
   */
  render(renderData: RTEBlock | RTENode, rteContext: RTERenderContext, createElement: VegaRTECreateElementFunction): VegaRTERenderResult;
  /**
   * Register the reference of the element in the rendering registry.
   *
   * @param {RTEBlock | RTENode} renderData - The data to register with the element.
   * @returns {VegaRTEUseRef} - The function to register the element.
   */
  protected useRef(renderData: RTEBlock | RTENode): VegaRTEUseRef;
  /**
   * Get a registered renderer by its key.
   *
   * @param {string} key - The key of the renderer.
   * @returns {Nullable<BaseRenderer>} - The registered renderer or null if not found.
   */
  protected getDTORenderer(key: string): Nullable<BaseRenderer>;
  /**
   * Get the extension context for the given rich text editor host element.
   *
   * @typedef HTMLVegaRichTextEditorElement - The type definition for the rich text editor host element.
   * @param {HTMLVegaRichTextEditorElement} el - The host rich text editor element.
   * @returns {Nullable<RTEExtensionContext>} - The extension context associated with the host.
   */
  protected getExtensionContext(el?: HTMLVegaRichTextEditorElement): Nullable<RTEExtensionContext>;
  /**
   * Auto render the block children if the block element is not exist
   *
   * @param {VegaRTERenderResult} parentElement - The parent element to append children to.
   * @param {RTEBlock | RTENode} renderData - The data to render children for.
   * @param {RTERenderContext} rteContext - The render context.
   * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
   */
  private appendChildren;
  /**
   * Render the children node.
   *
   * @param {RTENode | RTEBlock} renderData - The node to render children for.
   * @param {RTERenderContext} rteContext - The render context.
   * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
   * @returns {Nullable<VegaRTERenderResult>} - The rendered DOM element.
   */
  private renderChildren;
  /**
   * Fallback register reference for the element.
   *
   * @param {VegaRTERenderResult} element - The rendered DOM element.
   * @param {RTEBlock | RTENode} renderData - The data to register with the element.
   */
  private fallbackRegisterRef;
  /**
   * Render the given data as a DOM element.
   *
   * @param {VegaRTECreateElementFunction} createElement - The function to create a DOM element.
   * @param {RTEBlock | RTENode} renderData - The data to render.
   * @param {RTERenderContext} rteContext - The render context.
   */
  abstract doRender(createElement: VegaRTECreateElementFunction, renderData: RTEBlock | RTENode, rteContext: RTERenderContext): VegaRTERenderResult;
}
export {};
