import { ProGalleries, ProGalleriesSmall } from "@wix/wix-ui-icons-common";
import {
  Node_Type,
  RicosPluginToolbarNames,
  quickActionsModalSections
} from "./../ricos-types/index.js";
import { DEFAULTS } from "./defaults.js";
import { galleryConverter } from "./gallery-converter.js";
import { getAddButtons } from "./get-add-buttons.js";
import { getToolbarButtons } from "./get-toolbar-buttons.js";
import { handleGalleryUpload } from "./handle-gallery-upload.js";
import { tiptapExtensions } from "./tiptap/tiptap.js";
import { GALLERY_TYPE } from "./types.js";
const pluginGallery = (config) => {
  const pluginConfig = {
    type: "gallery",
    ...DEFAULTS.containerData,
    ...config
  };
  return {
    config: pluginConfig,
    type: GALLERY_TYPE,
    pmMarkConverters: [],
    pmNodeConverters: [galleryConverter],
    tiptapExtensions,
    getAddButtons: (config2, services) => getAddButtons(config2, services),
    toolbar: {
      names: [RicosPluginToolbarNames.GALLERY],
      getButtons: (config2, services) => getToolbarButtons(config2, services)
    },
    getQuickActions: ({ pluginServices, config: config2 }) => [
      {
        id: Node_Type.GALLERY,
        title: "QuickActionsPlugin_ActionTitle_Gallery",
        icon: pluginServices?.context.isMobile ? ProGalleries : ProGalleriesSmall,
        section: quickActionsModalSections.Media,
        tags: ["gallery", "photo", "album", "picture", "collection", "slideshow", "portfolio"],
        command: ({ publicCommands }) => {
          handleGalleryUpload({ publicCommands, services: pluginServices, config: config2 });
        }
      }
    ]
  };
};
export {
  pluginGallery
};
//# sourceMappingURL=editor.js.map

import { injectCss } from "./viewer-styles-inject.js";
injectCss();
