import { ModifyContentAction, ModifyContentActionType } from './modify-content-action.abstract';
/**
 * Action to type character into a decorator node
 *
 * @example decoratorNode.parent.apply(new InsertTextToDecoratorNodeAction(decoratorNode, '', 0 | 1))
 */
export class InsertTextToDecoratorNodeAction extends ModifyContentAction {
  constructor(decoratorNode, text, offset) {
    super();
    this.type = ModifyContentActionType.INSERT_TEXT_TO_DECORATOR_NODE;
    this.text = '';
    this.offset = 0;
    this.decoratorNode = decoratorNode;
    this.text = text;
    this.offset = offset;
  }
}
