import { ModifyContentAction, ModifyContentActionType } from './modify-content-action.abstract';
/**
 * Insert the image to current block. if the block is not image block, this will split the block to two blocks
 *
 * @example block.apply(new InsertImageToBlockAction(node, offset, imageNode))
 */
export class InsertImageToBlockAction extends ModifyContentAction {
  constructor(splitPointNode, startOffsetOfNode, imageBlockToBeInserted) {
    super();
    this.isFlushable = true;
    this.type = ModifyContentActionType.INSERT_IMAGE_TO_BLOCK;
    this.splitPointNode = splitPointNode;
    this.startOffsetOfNode = startOffsetOfNode;
    this.imageBlockToBeInserted = imageBlockToBeInserted;
  }
}
