"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_data_hooks = require("./data-hooks.js");
var import_insert_modal = require("./modals/insert-modal.js");
var import_types = require("./types.js");
const toolbarsToAddIn = [
  import_editor_common.TOOLBARS.FOOTER,
  import_editor_common.TOOLBARS.SIDE,
  import_editor_common.TOOLBARS.MOBILE
];
const getAddButtons = (_, services) => {
  const {
    modals,
    context: { isMobile }
  } = services;
  return [
    {
      id: import_ricos_types.Node_Type.TABLE,
      label: import_editor_common.INSERT_PLUGIN_BUTTONS.TABLE,
      dataHook: import_data_hooks.INSERT_TABLE_BUTTON,
      icon: import_wix_ui_icons_common.DataCollection,
      tooltip: "TablePlugin_InsertButton_Tooltip",
      toolbars: [import_editor_common.TOOLBARS.MOBILE, import_editor_common.TOOLBARS.FOOTER, import_editor_common.TOOLBARS.SIDE],
      command: ({ referenceElement }) => {
        modals?.togglePluginPanel({
          id: import_types.INSERT_TABLE_MODAL_ID,
          Component: import_insert_modal.InsertModal,
          componentProps: {},
          isMobile,
          initialFocus: `[data-hook="${import_data_hooks.INSERT_TABLE_MODAL_ADD_BUTTON}"]`,
          positioning: {
            referenceElement,
            placement: "bottom"
          },
          mobileLayout: "drawer"
        });
        return true;
      },
      menuConfig: {
        tags: "Table_plugin_search_tags",
        group: "advanced"
      }
    }
  ];
};
//# sourceMappingURL=get-add-buttons.js.map
