import { AnnotationAction } from './annotation-action.abstract';
import { CustomStyleAnnotation } from '../annotations/custom-style-annotation';
/**
 * Action to toggle block horizontal alignment annotation
 */
export class CustomStyleAnnotationAction extends AnnotationAction {
  constructor(customStyle) {
    super();
    this.isFlushable = true;
    this.customStyle = customStyle;
  }
  /**
   * Converts the action to an annotation
   *
   * @returns {CustomStyleAnnotation} The annotation
   */
  toAnnotation() {
    return new CustomStyleAnnotation(this.customStyle);
  }
}
