// Comments in English
import { redo } from "@codemirror/commands";
import { toggleBold, toggleItalic, toggleFenceBlock } from "./extensions/emphasis";

export const myMarkdownKeymap = [
  // Bold / Italic
  { key: "Mod-b", preventDefault: true, run: toggleBold },
  { key: "Mod-i", preventDefault: true, run: toggleItalic },

  // Redo
  { key: "Mod-Shift-z", preventDefault: true, run: redo },
  { key: "Mod-y", preventDefault: true, run: redo },

  // Fenced code block toggle
  { key: "Mod-`", preventDefault: true, run: toggleFenceBlock },
  { key: "Mod-Shift-`", preventDefault: true, run: toggleFenceBlock },
  { key: "Mod-Alt-c", preventDefault: true, run: toggleFenceBlock },
] as const;
