import { NodeAnnotation, NodeAnnotationTypeEnum } from './node-annotation.abstract';
/**
 * Annotation to make text as plain text
 */
export class PlainTextAnnotation extends NodeAnnotation {
  constructor(plainText) {
    super();
    this.type = NodeAnnotationTypeEnum.PLAIN_TEXT;
    this.plainText = true;
    this.plainText = plainText;
  }
  /**
   * @inheritDoc
   */
  static from(plainText) {
    return [NodeAnnotationTypeEnum.PLAIN_TEXT, new PlainTextAnnotation(plainText)];
  }
  /**
   * @inheritDoc
   */
  clone() {
    return new PlainTextAnnotation(this.plainText);
  }
  /**
   * @inheritDoc
   */
  renderClass() {
    return undefined;
  }
  /**
   * @inheritDoc
   */
  renderStyle() {
    return undefined;
  }
  /**
   * @inheritDoc
   */
  toJSON() {
    return this.plainText ? { plainText: this.plainText } : undefined;
  }
}
