import { AnnotationStyle, RTEBlockAnnotationMapKey, RTEBlockAnnotationMapValue, RTERenderContext, VegaRTEBlockAnnotations, VegaRTEBlockBase, VegaRTEContentBlock, VegaRTETransformOptions } from '../../interface';
import { AnnotationAction } from '../actions/annotation-action.abstract';
import { Nullable } from '../../../../types/general';
import { ModifyContentAction } from '../actions/modify-content-action.abstract';
import type { VegaRTEContent } from '../content-state';
import { Annotation } from '../annotations/annotation.abstract';
import type { RTENode } from '../nodes/node.abstract';
import type { RTEListItemBlock } from './list-item-block';
import { CustomAttributeAnnotation } from '../annotations/custom-attribute-annotation';
import { ClassType } from '../../../../types/class.type';
export declare type BlockAnnotations = Map<string, Annotation>;
export declare type BlockAnnotationsEntity = [RTEBlockAnnotationMapKey, RTEBlockAnnotationMapValue];
export declare type RTEBlockParentType = VegaRTEContent | RTEBlock;
export declare type RTEBlockChildrenType = RTEBlock | RTENode;
/**
 * Abstract class for block
 */
export declare abstract class RTEBlock<P = RTEBlockParentType, C = RTEBlockChildrenType> {
  id: string;
  annotationMap: BlockAnnotations;
  /**
   * Minimize-safe type discriminator. Each concrete sub-class declares its own
   * `static readonly dtoName = 'ClassName'`.
   */
  readonly dtoName: string;
  abstract type: string;
  abstract parent: P;
  abstract children: C[];
  protected constructor(id: string);
  /**
   * Creates a new instance of the block from the given JSON object.
   *
   * @param {unknown} json - The JSON object to create the block from.
   * @param {VegaRTETransformOptions} options - Options for transforming the block.
   */
  static from(json: unknown, options?: VegaRTETransformOptions): InstanceType<ClassType<RTEBlock>>;
  /**
   * Generates block children from an array of VegaRTEContentBlock.
   *
   * @param {VegaRTEContentBlock[]} blockArray - The array of VegaRTEContentBlock to generate children from.
   * @param {VegaRTETransformOptions} [options] - Optional transformation options.
   * @param {VegaRTEContent | RTEBlock} [parentBlock] - Optional parent block.
   * @returns {RTEBlock[]} An array of generated RTEBlock children.
   */
  static generateBlockChildren(blockArray: VegaRTEContentBlock[], options?: VegaRTETransformOptions, parentBlock?: RTEBlockParentType): RTEBlock[];
  /**
   * The function `createAnnotationEntity` creates a block annotation entity based on the provided type
   * and value.
   *
   * @param {keyof VegaRTEBlockAnnotations} type - The `type` parameter is a key of the `VegaRTEBlockAnnotations` enum, which specifies
   * the type of annotation entity to create.
   * @param {unknown} value - The `value` parameter in the `createAnnotationEntity` function is the value
   * that will be used to create the annotation entity. It can be of any type depending on the specific
   * annotation being created.
   * @returns {Nullable<BlockAnnotationsEntity>} The `createAnnotationEntity` function returns a nullable tuple containing a
   * `BlockAnnotationTypeEnum` and a `BlockAnnotation` object.
   */
  protected static createAnnotationEntity(type: keyof VegaRTEBlockAnnotations, value: unknown): Nullable<BlockAnnotationsEntity>;
  /**
   * Converts annotations to an array of block annotation entities.
   *
   * @param {BlockAnnotations} annotationMap - The map to store the converted annotations.
   * @param {VegaRTEBlockAnnotations} annotations - The annotations to convert.
   */
  protected static convertAnnotationsToMap(annotationMap: BlockAnnotations, annotations: VegaRTEBlockAnnotations): void;
  /**
   * Check if the block should be rendered as a wrapper.
   *
   * @returns {boolean} - Returns true if the block is an internal wrapper.
   */
  shouldRenderAsInternalWrapper(): boolean;
  /**
   * Class to JSON object
   *
   * @returns {VegaRTEBlockBase} - JSON object
   */
  toJSON(): VegaRTEBlockBase;
  /**
   * Get annotation by type
   *
   * @typedef T generic type
   * @param {string} type - Annotation type
   * @returns {Nullable<T>} - Annotation
   */
  getAnnotationByType<T extends Annotation>(type: string): Nullable<T>;
  /**
   * Apply action to block
   *
   * @param {AnnotationAction} action - Annotation action
   */
  apply(action: AnnotationAction | ModifyContentAction): void;
  /**
   * Get the first node of the block
   *
   * @returns {Nullable<RTENode>} The first RTENode or null if no children exist.
   */
  getFirstNode(): Nullable<RTENode>;
  /**
   * Check if the block is a list item block
   *
   * @returns {boolean} True if the block is a list item block, false otherwise.
   */
  isListItemBlock(): this is RTEListItemBlock;
  /**
   * Get styles from annotations
   *
   * @param {RTERenderContext} [options={ standalone: false }] - Options to control style mode
   * @returns {AnnotationStyle} - Annotation styles
   */
  getStyles(options?: RTERenderContext): AnnotationStyle;
  /**
   * Get classes from annotations
   *
   * @param {RTERenderContext} [options={ standalone: false }] - Options to control standalone mode
   * @returns {string} - Annotation style
   */
  getClasses(options?: RTERenderContext): string;
  /**
   * Get custom attribute annotation, excluding "class" and "style"
   *
   * @returns {Nullable<CustomAttributeAnnotation>} - custom attribute annotation
   */
  getCustomAttributesAnnotation(): Nullable<CustomAttributeAnnotation>;
  /**
   * Generate attributes as string
   *
   * @param {VegaRTETransformOptions} options - Options to control the generation of the attribute string, such as whether to filter inline styles.
   * @param {...string} attrs - Additional attributes to include
   * @returns {string} - Attributes as string
   */
  protected generateAttributeString(options?: VegaRTETransformOptions, ...attrs: string[]): string;
  /**
   * Apply action to block
   *
   * @param {AnnotationAction|ModifyContentAction} action - Annotation action
   */
  protected doApply(action: AnnotationAction | ModifyContentAction): void;
  /**
   * Apply annotation action to block
   *
   * @param {AnnotationAction} action - Annotation action
   */
  protected applyAnnotationAction(action: AnnotationAction): void;
  /**
   * abstract method to apply annotation action in each block
   *
   * @param {AnnotationAction} action - Annotation action
   */
  protected doAnnotationActionApply?(action: AnnotationAction): void;
  /**
   * clone annotations of the block
   *
   * @returns {BlockAnnotations} - Cloned annotations
   */
  protected cloneAnnotations(): BlockAnnotations;
  /**
   * abstract method to be overridden in each block to verify whether the block is not empty
   *
   * @returns {boolean} true if the block is not empty
   */
  abstract isNotEmpty(): boolean;
  abstract getLastNode(): RTENode;
  /**
   * Converts the block to HTML.
   *
   * @param {VegaRTETransformOptions} options - Optional conversion options.
   * @returns {string} The HTML string representing the block.
   */
  abstract toHtml(options?: VegaRTETransformOptions): string;
  /**
   * Clones the block.
   *
   * @param {RTEBlock | VegaRTEContent} parent - The parent block of the cloned block.
   * @returns {InstanceType<ClassType<RTEBlock>>} A new instance of the block with cloned properties.
   */
  abstract clone(parent: P): InstanceType<ClassType<RTEBlock>>;
}
