import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
/**
 * Update the text block and image block horizontal alignment strategy.
 */
export class BlockUpdateHorizontalAlignmentStrategy extends ActionHandleStrategy {
  /**
   * Updating the horizontal alignment of a block requires cascading updates to the custom style.
   *
   * @param {HorizontalAlignmentAnnotationAction} _action - The horizontal alignment annotation action.
   * @param {RTETextBlock} target - The current text block.
   */
  handleAction(_action, target) {
    this.updateCustomStyleAnnotation(target, ['textAlign']);
  }
}
