import { Extension as d } from "../../../../../@tiptap_core@2.14.0_@tiptap_pm@2.14.0/node_modules/@tiptap/core/dist/index.js";
import { history as t, redo as e, undo as n } from "../../../../../prosemirror-history@1.4.1/node_modules/prosemirror-history/dist/index.js";
const m = d.create({
  name: "history",
  addOptions() {
    return {
      depth: 100,
      newGroupDelay: 500
    };
  },
  addCommands() {
    return {
      undo: () => ({ state: o, dispatch: r }) => n(o, r),
      redo: () => ({ state: o, dispatch: r }) => e(o, r)
    };
  },
  addProseMirrorPlugins() {
    return [
      t(this.options)
    ];
  },
  addKeyboardShortcuts() {
    return {
      "Mod-z": () => this.editor.commands.undo(),
      "Shift-Mod-z": () => this.editor.commands.redo(),
      "Mod-y": () => this.editor.commands.redo(),
      // Russian keyboard layouts
      "Mod-я": () => this.editor.commands.undo(),
      "Shift-Mod-я": () => this.editor.commands.redo()
    };
  }
});
export {
  m as History,
  m as default
};
//# sourceMappingURL=index.js.map
