import { Nullable } from '../../../../types/general';
import { AnnotationAction } from '../actions/annotation-action.abstract';
import { ModifyContentAction } from '../actions/modify-content-action.abstract';
import type { RTEBlock } from '../blocks/block.abstract';
import type { VegaRTEContent } from '../content-state';
import type { RTENode } from '../nodes/node.abstract';
import type { ActionHandleStrategy } from './action-handle-strategy.abstract';
/**
 * The strategies registry, contains static methods `register`, `get` and `getStrategyAndExecute`.
 */
export declare class ActionHandleStrategyRegistry {
  private static readonly registry;
  /**
   * Bind a specific strategy to a special action type of the rich text node.
   *
   * @param {string} actionType - The special action type or the action class name.
   * @param {string} targetClass - The rich text node class name.
   * @param {ActionHandleStrategy} strategy - The action handle strategy instance.
   */
  static register<T extends ModifyContentAction | AnnotationAction, target extends RTENode | RTEBlock | VegaRTEContent, R = void>(actionType: string, targetClass: string, strategy: ActionHandleStrategy<T, target, R>): void;
  /**
   * Unregister the strategy for the specific action type and target class.
   *
   * @param {string} actionType - The special action type or the action class name.
   * @param {string} targetClass - The rich text node class name.
   */
  static unregister(actionType: string, targetClass: string): void;
  /**
   * Get the special strategy that handle the action logic.
   *
   * @typedef T generic type
   * @typedef target generic type
   * @typedef R generic type
   * @param {string} actionType - The special action type or the action class name.
   * @param {string} targetClass - The rich text node class name.
   * @returns {Nullable<ActionHandleStrategy<T, target, R>>} - The action handle strategy instance if defined.
   */
  static get<T extends ModifyContentAction | AnnotationAction, target extends RTENode | RTEBlock | VegaRTEContent, R = void>(actionType: string, targetClass: string): Nullable<ActionHandleStrategy<T, target, R>>;
  /**
   * Get the special strategy from the registry and run the strategy execute method.
   *
   * @typedef R generic type
   * @param {ModifyContentAction | AnnotationAction} action - The update node action instance.
   * @param {RTENode | RTEBlock | VegaRTEContent} RTEInstance - The rich text editor node.
   * @returns {R | undefined} The return value of the strategy method execute invoke result.
   */
  static executeTheStrategy<T extends ModifyContentAction | AnnotationAction, target extends RTENode | RTEBlock | VegaRTEContent, R = void>(action: T, RTEInstance: target): R | undefined;
  /**
   * Check if the action type can be handled by strategy for the specific RTE instance.
   *
   * @param {string} actionType - The special action type or the action class name.
   * @param {RTENode | RTEBlock | VegaRTEContent} RTEInstance - The rich text editor node.
   * @returns {boolean} - Whether the action type can be handled by the strategy.
   */
  static canHandle(actionType: string, RTEInstance: RTENode | RTEBlock | VegaRTEContent): boolean;
}
