"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 ricos_common_plugins_exports = {};
__export(ricos_common_plugins_exports, {
  commonPluginConfig: () => commonPluginConfig,
  commonPlugins: () => commonPlugins
});
module.exports = __toCommonJS(ricos_common_plugins_exports);
var import_ts_is_present = require("ts-is-present");
var import_ricos_content = require("./../ricos-content/index.js");
var import_ricos_types = require("./../ricos-types/index.js");
var import_state = require("./../tiptap/pm/state.js");
var import_editor_common = require("./../editor-common/index.js");
var import_blockquote = require("./blockquote/blockquote.js");
var import_bold = require("./bold/bold.js");
var import_breakout = require("./breakout/breakout.js");
var import_bulleted_list = require("./bulleted-list/bulleted-list.js");
var import_checkbox_list = require("./checkbox-list/checkbox-list.js");
var import_draggable = require("./draggable/draggable.js");
var import_font_size = require("./font-size/font-size.js");
var import_gap_spacer = require("./gap-spacer/gap-spacer.js");
var import_hard_break = require("./hard-break/hard-break.js");
var import_italic = require("./italic/italic.js");
var import_plugin_cell = require("./layout/plugin-cell.js");
var import_plugin_layout = require("./layout/plugin-layout.js");
var import_list_item = require("./list-item/list-item.js");
var import_not_overtypable = require("./not-overwritable/not-overtypable.js");
var import_ordered_list = require("./ordered-list/ordered-list.js");
var import_paragraph = require("./paragraph/paragraph.js");
var import_editor = require("./quick-actions/editor.js");
var import_resizable = require("./resizable/resizable.js");
var import_selection = require("./selection/selection.js");
var import_spotlight = require("./spotlight/spotlight.js");
var import_strikethrough = require("./strikethrough/strikethrough.js");
var import_subscript = require("./subscript/subscript.js");
var import_superscript = require("./superscript/superscript.js");
var import_tab = require("./tab/tab.js");
var import_text_align = require("./text-align/text-align.js");
var import_title = require("./title/title.js");
var import_underline = require("./underline/underline.js");
var import_undo_redo = require("./undo-redo/undo-redo.js");
var import_unsupported = require("./unsupported/unsupported.js");
const commonPlugins = (editorProps, pluginOptions) => {
  const layoutConfig = pluginOptions.find(
    (config) => ["LAYOUT", "layout"].includes(config.type)
  );
  const fontSizeConfig = pluginOptions.find(
    (config) => config.type === "fontSize"
  );
  return [
    import_blockquote.pluginBlockquote,
    import_bold.pluginBold,
    import_bulleted_list.pluginBulletedList,
    import_checkbox_list.pluginCheckboxList,
    (0, import_font_size.pluginFontSize)(fontSizeConfig),
    import_italic.pluginItalic,
    import_list_item.pluginListItem,
    import_ordered_list.pluginOrderedList,
    import_paragraph.pluginParagraph,
    import_text_align.pluginTextAlignment,
    import_underline.pluginUnderline,
    import_resizable.pluginResizable,
    import_draggable.pluginDraggable,
    import_undo_redo.pluginUndoRedo,
    import_title.pluginTitle,
    import_hard_break.pluginHardBreak,
    import_breakout.pluginBreakout,
    import_tab.pluginTab,
    import_selection.pluginSelection,
    import_not_overtypable.pluginNotOvertypable,
    import_gap_spacer.pluginGapSpacer,
    import_unsupported.unsupportedPlugin,
    import_strikethrough.pluginStrikethrough,
    import_subscript.pluginSubscript,
    import_superscript.pluginSuperscript,
    (0, import_plugin_layout.pluginLayout)(layoutConfig),
    (0, import_plugin_cell.pluginCell)(layoutConfig),
    (0, import_editor.pluginQuickActions)(
      (() => {
        const qa = editorProps?.toolbarSettings?.getToolbarSettings?.({})?.find(({ name }) => name === import_ricos_types.ToolbarType.QUICK_ACTIONS);
        if (!qa) {
          return {};
        }
        const { placeholder, ...rest } = qa;
        return placeholder !== void 0 ? { ...rest, customPlaceholder: placeholder } : rest;
      })()
    ),
    import_spotlight.pluginSpotlight
  ].filter(import_ts_is_present.isDefined);
};
const commonPluginConfig = {
  [import_ricos_content.INDENT_TYPE]: { isTextSelection: import_editor_common.isTextSelection, AllSelection: import_state.AllSelection }
};
//# sourceMappingURL=index.js.map
