import { Objects } 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 { ShapeSelectModal } from "../components/shape-select-modal.js";
import { INSERT_SHAPE_BUTTON, SHAPE_SELECT_MODAL } from "../utils/data-hooks.js";
const toolbarsToAddIn = [TOOLBARS.FOOTER, TOOLBARS.SIDE, TOOLBARS.MOBILE];
const getAddButtons = (config, services) => {
  const {
    modals,
    context: { isMobile }
  } = services;
  return [
    {
      id: Node_Type.SHAPE,
      label: INSERT_PLUGIN_BUTTONS.SHAPE,
      dataHook: INSERT_SHAPE_BUTTON,
      icon: Objects,
      tooltip: "ShapePlugin_InsertButton_Tooltip",
      toolbars: toolbarsToAddIn,
      command: ({ referenceElement }) => {
        modals.togglePluginPanel({
          id: SHAPE_SELECT_MODAL,
          Component: ShapeSelectModal,
          componentProps: {
            getShapeUrl: config.getShapeUrl
          },
          isMobile,
          positioning: {
            referenceElement,
            placement: "bottom"
          }
        });
        return true;
      },
      menuConfig: {
        tags: "Shape_plugin_search_tags"
      }
    }
  ];
};
export {
  getAddButtons,
  toolbarsToAddIn
};
//# sourceMappingURL=get-add-buttons.js.map
