"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 get_add_buttons_exports = {};
__export(get_add_buttons_exports, {
  getAddButtons: () => getAddButtons,
  toolbarsToAddIn: () => toolbarsToAddIn
});
module.exports = __toCommonJS(get_add_buttons_exports);
var import_wix_ui_icons_common = require("@wix/wix-ui-icons-common");
var import_ricos_types = require("./../../ricos-types/index.js");
var import_editor_common = require("./../../editor-common/index.js");
var import_shape_select_modal = require("../components/shape-select-modal.js");
var import_data_hooks = require("../utils/data-hooks.js");
const toolbarsToAddIn = [import_editor_common.TOOLBARS.FOOTER, import_editor_common.TOOLBARS.SIDE, import_editor_common.TOOLBARS.MOBILE];
const getAddButtons = (config, services) => {
  const {
    modals,
    context: { isMobile }
  } = services;
  return [
    {
      id: import_ricos_types.Node_Type.SHAPE,
      label: import_editor_common.INSERT_PLUGIN_BUTTONS.SHAPE,
      dataHook: import_data_hooks.INSERT_SHAPE_BUTTON,
      icon: import_wix_ui_icons_common.Objects,
      tooltip: "ShapePlugin_InsertButton_Tooltip",
      toolbars: toolbarsToAddIn,
      command: ({ referenceElement }) => {
        modals.togglePluginPanel({
          id: import_data_hooks.SHAPE_SELECT_MODAL,
          Component: import_shape_select_modal.ShapeSelectModal,
          componentProps: {
            getShapeUrl: config.getShapeUrl
          },
          isMobile,
          positioning: {
            referenceElement,
            placement: "bottom"
          }
        });
        return true;
      },
      menuConfig: {
        tags: "Shape_plugin_search_tags"
      }
    }
  ];
};
//# sourceMappingURL=get-add-buttons.js.map
