"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 editor_exports = {};
__export(editor_exports, {
  pluginGallery: () => pluginGallery
});
module.exports = __toCommonJS(editor_exports);
var import_wix_ui_icons_common = require("@wix/wix-ui-icons-common");
var import_ricos_types = require("./../ricos-types/index.js");
var import_defaults = require("./defaults.js");
var import_gallery_converter = require("./gallery-converter.js");
var import_get_add_buttons = require("./get-add-buttons.js");
var import_get_toolbar_buttons = require("./get-toolbar-buttons.js");
var import_handle_gallery_upload = require("./handle-gallery-upload.js");
var import_tiptap = require("./tiptap/tiptap.js");
var import_types = require("./types.js");
const pluginGallery = (config) => {
  const pluginConfig = {
    type: "gallery",
    ...import_defaults.DEFAULTS.containerData,
    ...config
  };
  return {
    config: pluginConfig,
    type: import_types.GALLERY_TYPE,
    pmMarkConverters: [],
    pmNodeConverters: [import_gallery_converter.galleryConverter],
    tiptapExtensions: import_tiptap.tiptapExtensions,
    getAddButtons: (config2, services) => (0, import_get_add_buttons.getAddButtons)(config2, services),
    toolbar: {
      names: [import_ricos_types.RicosPluginToolbarNames.GALLERY],
      getButtons: (config2, services) => (0, import_get_toolbar_buttons.getToolbarButtons)(config2, services)
    },
    getQuickActions: ({ pluginServices, config: config2 }) => [
      {
        id: import_ricos_types.Node_Type.GALLERY,
        title: "QuickActionsPlugin_ActionTitle_Gallery",
        icon: pluginServices?.context.isMobile ? import_wix_ui_icons_common.ProGalleries : import_wix_ui_icons_common.ProGalleriesSmall,
        section: import_ricos_types.quickActionsModalSections.Media,
        tags: ["gallery", "photo", "album", "picture", "collection", "slideshow", "portfolio"],
        command: ({ publicCommands }) => {
          (0, import_handle_gallery_upload.handleGalleryUpload)({ publicCommands, services: pluginServices, config: config2 });
        }
      }
    ]
  };
};
//# sourceMappingURL=editor.js.map
