import { ProGalleries } from "@wix/wix-ui-icons-common";
import { Node_Type } from "./../ricos-types/index.js";
import { INSERT_PLUGIN_BUTTONS, TOOLBARS } from "./../editor-common/index.js";
import { INSERT_GALLERY_BUTTON } from "./data-hooks.js";
import { handleGalleryUpload } from "./handle-gallery-upload.js";
const toolbarsToAddIn = [
  TOOLBARS.FOOTER,
  TOOLBARS.SIDE,
  TOOLBARS.MOBILE
];
const getAddButtons = (config, services) => {
  return [
    {
      id: Node_Type.GALLERY,
      label: INSERT_PLUGIN_BUTTONS.GALLERY,
      dataHook: INSERT_GALLERY_BUTTON,
      icon: ProGalleries,
      tooltip: "GalleryPlugin_InsertButton_Tooltip",
      toolbars: toolbarsToAddIn,
      command: ({ publicCommands, referenceElement }) => {
        const { updateService } = services || {};
        if (updateService === void 0) {
          return true;
        }
        if (!services) {
          return false;
        }
        handleGalleryUpload({
          publicCommands,
          services,
          config,
          referenceElement: referenceElement ?? void 0
        });
        return true;
      },
      menuConfig: {
        tags: "Gallery_plugin_search_tags"
      }
    }
  ];
};
export {
  getAddButtons,
  toolbarsToAddIn
};
//# sourceMappingURL=get-add-buttons.js.map
