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';
export declare type ActionHandlerExecution = () => unknown;
/**
 * Abstract class for action handler interceptors, which can intercept actions before they are handled.
 */
export declare abstract class ActionHandlerInterceptor<T extends ModifyContentAction | AnnotationAction, TargetElement extends RTENode | RTEBlock | VegaRTEContent> {
  /**
   * Checks whether the interceptor can intercept the given action and target.
   *
   * @param {ModifyContentAction | AnnotationAction} action - the action to be intercepted
   * @param {RTENode | RTEBlock | VegaRTEContent} target - the target of the action
   * @returns {boolean} - true if the interceptor can intercept, false otherwise
   */
  abstract canIntercept(action: T, target: TargetElement): boolean;
  /**
   * Called before handling the given action and target.
   *
   * @param {ModifyContentAction | AnnotationAction} action - the action to be handled
   * @param {RTENode | RTEBlock | VegaRTEContent} target - the target of the action
   */
  abstract intercept(execution: ActionHandlerExecution, action: T, target: TargetElement): unknown;
}
