import { BoldAnnotation } from '../annotations/bold-annotation';
import { TextSplittableAction } from './splittable-action.abstract';
/**
 * Action to toggle bold annotation
 */
export class BoldAnnotationAction extends TextSplittableAction {
  constructor(bold) {
    super();
    this.isFlushable = true;
    this.bold = bold;
  }
  /**
   * Converts the action to an annotation
   *
   * @returns {BoldAnnotation} the annotation
   */
  toAnnotation() {
    return new BoldAnnotation(this.bold);
  }
}
