import { RTENodeAnnotationMapKey, RTENodeAnnotationMapValue, VegaRTETransformOptions, VegaRTETextAnnotations, VegaRTETextNode } from '../../interface';
import { NodeAnnotations, NodeTypeEnum, RTENode } from './node.abstract';
import { AnnotationAction } from '../actions/annotation-action.abstract';
import { Nullable } from '../../../../types/general';
import { RTETextBlock } from '../blocks/text-block';
import { ModifyContentAction } from '../actions/modify-content-action.abstract';
import { InlineHtmlAnnotation } from '../annotations/inline-html-annotation';
export declare type Link = {
  href?: string;
};
export declare type InlineHtmlTagDescriptor = {
  htmlTag: string;
  attrStr: string;
  groupId?: string;
  annotation: InlineHtmlAnnotation;
};
/**
 * Text node
 */
export declare class RTETextNode extends RTENode<RTETextBlock> {
  static registerActionStrategyStatus: Record<string, boolean>;
  static readonly htmlTag: 'span';
  readonly type: NodeTypeEnum | string;
  text: string;
  parent: RTETextBlock;
  constructor(id: string, text: string, parentBlock: RTETextBlock, annotationMap?: Map<RTENodeAnnotationMapKey, RTENodeAnnotationMapValue>);
  /**
   * Determines if the given HTML tag is supported by the RTETextNode.
   *
   * @param {string} tag - The HTML tag to check.
   * @returns {boolean} `true` if the tag is supported, otherwise `false`.
   */
  static supportsHtmlTag(tag: string): boolean;
  /**
   * Creates an RTETextNode from a VegaRTETextNode with annotations and a parent RTETextBlock.
   *
   * @param {VegaRTETextNode} richText - A rich text node
   * @param {RTETextBlock} parentBlock - Parent block
   * @param {VegaRTETransformOptions} options - Optional transformation options.
   * @returns {RTETextNode} an RTETextNode
   */
  static from(richText: VegaRTETextNode, parentBlock: RTETextBlock, options?: VegaRTETransformOptions): RTETextNode;
  /**
   * Generates a map of text annotations for the given set of annotations.
   *
   * @param {VegaRTETextAnnotations} annotations - The annotations to be converted into a map.
   * @param {VegaRTETransformOptions} options - Optional transformation options.
   * @param {RTETextBlock} parentBlock - The parent text block.
   * @param {RTETextNode} textNode - The text node.
   * @returns {NodeAnnotations} The map of text annotations.
   */
  protected static generateTextAnnotationMap(annotations: VegaRTETextAnnotations, options?: VegaRTETransformOptions, parentBlock?: RTETextBlock, textNode?: RTETextNode): NodeAnnotations;
  /**
   * Creates different types of text annotations based on the provided type and value.
   *
   * @param {keyof VegaRTETextAnnotations} type - The key of the type.
   * @param {unknown} value - The value that will be used to create the specific type of annotation entity based on the `type` provided.
   * @param {VegaRTETransformOptions} [options] - Optional transformation options that may be used for creating the annotation entity.
   * @returns {Nullable<[RTENodeAnnotationMapKey, RTENodeAnnotationMapValue]>} Returning a nullable tuple containing a key and a
   * value from the `RTENodeAnnotationMapKey` and `RTENodeAnnotationMapValue` types.
   */
  protected static createAnnotationEntity(type: keyof VegaRTETextAnnotations, value: unknown, options?: VegaRTETransformOptions): Nullable<[RTENodeAnnotationMapKey, RTENodeAnnotationMapValue]>;
  /**
   * @inheritDoc
   */
  toJSON(): VegaRTETextNode;
  /**
   * @inheritDoc
   */
  toHtml(options?: VegaRTETransformOptions): string;
  /**
   * Creates a new RTETextNode with the specified text and copies the parent block and annotation map from the original node.
   *
   * @param {string} text - The text content of the RTETextNode that will be created.
   * @returns {RTETextNode} An new RTETextNode
   */
  cloneWithText(text: string): RTETextNode;
  /**
   * @inheritDoc
   */
  clone(parent: RTETextBlock): RTETextNode;
  /**
   * Checks if a node is empty
   *
   * @returns {boolean}  It returns `true` if the node is empty
   */
  isEmpty(): boolean;
  /**
   * @inheritDoc
   */
  isTextNode(): this is RTETextNode;
  /**
   * @inheritDoc
   */
  getRangeEndOffset(): number;
  /**
   * @inheritDoc
   */
  getRangeContainer(): Nullable<Node>;
  /**
   * @inheritDoc
   */
  isContentEditable(): boolean;
  /**
   * Returns the inline HTML wrapper descriptor at the given depth in the
   * annotation chain. Depth 0 is the outermost wrapper, depth 1 is its child, etc.
   *
   * @param {number} depth - Zero-based depth in the inline HTML chain.
   * @returns {InlineHtmlTagDescriptor | null} The wrapper descriptor at that depth, or `null`.
   */
  getInlineHtmlTagAtDepth(depth: number): InlineHtmlTagDescriptor | null;
  /**
   * Renders the node starting from the given depth in the inline HTML chain.
   * Depth 0 renders the full chain (equivalent to {@link toHtml} for inline HTML nodes).
   *
   * @param {number} depth - Zero-based depth to start rendering from.
   * @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
   * @returns {string} HTML string from that depth onward.
   */
  renderHtmlFromDepth(depth: number, options?: VegaRTETransformOptions): string;
  /**
   * Traverses the inline HTML annotation chain to the given depth and returns
   * the annotation at that level, or `null` if the chain is shorter.
   *
   * @param {number} depth - Zero-based depth (0 = outermost annotation).
   * @returns {Nullable<InlineHtmlAnnotation>} The annotation at that depth, or `null`.
   */
  getInlineHtmlAnnotationAtDepth(depth: number): Nullable<InlineHtmlAnnotation>;
  /**
   * Registers the action strategies for the RTETextNode.
   */
  protected registerModifyStrategy(): void;
  /**
   * @inheritDoc
   */
  protected doAnnotationActionApply(action: AnnotationAction): void;
  /**
   * @inheritDoc
   */
  protected doModifyActionApply(action: ModifyContentAction): void;
  /**
   * Apply action to node
   *
   * @param {RTETextNode} node - Text node
   * @param {AnnotationAction} action - AnnotationAction
   */
  private applyActionToNode;
  /**
   * Sync up the selected node by change manager
   *
   * @param {RTETextNode} selectedNode - The selected node
   */
  private syncUpSelectedNodes;
  /**
   * @param {InlineHtmlAnnotation} inlineHtmlNode - The inline HTML annotation to wrap the text node.
   * @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
   * @returns {string} The HTML string representation of the text node wrapped with the inline HTML.
   */
  private renderWithWrapperStr;
  /**
   * Generate the attribute string for the inline HTML annotation
   *
   * @param {InlineHtmlAnnotation} annotation - The inline HTML annotation
   * @returns {string} The attribute string for the inline HTML annotation
   */
  private annotationAttrStr;
  /**
   * Generates the HTML representation of the text node.
   *
   * @param {VegaRTETransformOptions} [options] - Optional conversion options that may affect how the text node is rendered as HTML.
   * @returns {string} The HTML string representation of the text node.
   */
  private renderTextStr;
  /**
   * Determines if the text node should be rendered as plain text.
   *
   * @returns {boolean} `true` if the text node should be rendered as plain text, otherwise `false`.
   */
  private shouldRenderAsPlainText;
}
