"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const instantiation = require("../../instantiation/common/instantiation.js");
const IUndoRedoService = instantiation.createDecorator("undoRedoService");
class ResourceEditStackSnapshot {
  constructor(resource, elements) {
    this.resource = resource;
    this.elements = elements;
  }
}
class UndoRedoGroup {
  constructor() {
    this.id = UndoRedoGroup._ID++;
    this.order = 1;
  }
  nextOrder() {
    if (this.id === 0) {
      return 0;
    }
    return this.order++;
  }
}
UndoRedoGroup._ID = 0;
UndoRedoGroup.None = new UndoRedoGroup();
class UndoRedoSource {
  constructor() {
    this.id = UndoRedoSource._ID++;
    this.order = 1;
  }
  nextOrder() {
    if (this.id === 0) {
      return 0;
    }
    return this.order++;
  }
}
UndoRedoSource._ID = 0;
UndoRedoSource.None = new UndoRedoSource();
exports.IUndoRedoService = IUndoRedoService;
exports.ResourceEditStackSnapshot = ResourceEditStackSnapshot;
exports.UndoRedoGroup = UndoRedoGroup;
exports.UndoRedoSource = UndoRedoSource;
