import { AnnotationAction } from './annotation-action.abstract';
import { SelectionRangeAnnotation } from '../annotations/selection-range-annotation';
/**
 * Action to change the selection range
 */
export class SelectionChangeAction extends AnnotationAction {
  constructor(range) {
    super();
    this.isFlushable = false;
    this.range = range;
  }
  /**
   * Converts the action to an annotation
   *
   * @returns {SelectionRangeAnnotation} The annotation
   */
  toAnnotation() {
    return new SelectionRangeAnnotation(this.range);
  }
}
