"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var extension_exports = {};
__export(extension_exports, {
  gapSpacerExtension: () => gapSpacerExtension
});
module.exports = __toCommonJS(extension_exports);
var import_tiptap_extensions = require("./../../tiptap-extensions/index.js");
var import_gap_spacer_nodes = require("./gap-spacer-nodes.js");
var import_gap_spacer_plugin = require("./gap-spacer-plugin.js");
const gapSpacerExtension = (0, import_tiptap_extensions.createRicosFunctionalExtension)({
  type: "extension",
  groups: [],
  name: "gapSpacer",
  reconfigure(config, _extensions, _props, _settings, services) {
    return {
      ...config,
      addOptions() {
        return {
          t: services.t
        };
      }
    };
  },
  createExtensionConfig() {
    return {
      name: this.name,
      addProseMirrorPlugins() {
        return [(0, import_gap_spacer_plugin.gapSpacer)(this.options.t)];
      },
      extendNodeSchema(extension) {
        const allowGapSpacer = (0, import_gap_spacer_nodes.isNodeSpaced)(extension.name);
        return {
          allowGapSpacer
        };
      }
    };
  }
});
//# sourceMappingURL=extension.js.map
