import { createRicosNodeExtension } from "./create-ricos-extension/index.js";
const keymapOverride = createRicosNodeExtension({
  name: "keymap-override",
  groups: ["shortcuts-enabled"],
  type: "html-node",
  reconfigure: (config, _extensions, _props, settings, services) => {
    return {
      ...config,
      addOptions() {
        return {
          services,
          HTMLAttributes: {},
          ...settings
        };
      }
    };
  },
  createExtensionConfig() {
    return {
      name: this.name,
      inline: true,
      group: "inline",
      priority: Infinity,
      selectable: false,
      addKeyboardShortcuts() {
        const tiptapKeyboardShortcuts = {};
        const needToCancelEnter = this.options.services.shortcuts.asArray().some((s) => s.getName() === "Enter");
        if (needToCancelEnter) {
          tiptapKeyboardShortcuts.Enter = () => true;
        }
        tiptapKeyboardShortcuts["Mod-a"] = () => true;
        return {
          ...tiptapKeyboardShortcuts
        };
      }
    };
  }
});
export {
  keymapOverride
};
//# sourceMappingURL=keymap-override.js.map
