import { createDeleteButton } from "./../_shared/plugin-toolbar/create-delete-button.js";
import { createNodeAlignmentButton } from "./../_shared/plugin-toolbar/create-node-alignment-button.js";
import { createReplaceButton } from "./../_shared/plugin-toolbar/create-replace-button.js";
import { createNodeSizeButton } from "./../_shared/plugin-toolbar/node-size-button/create-node-size-button.js";
import { createSeparator } from "./../_shared/plugin-toolbar/separator/create-separator.js";
import { isVisibleOnlyOnDesktop } from "./../_shared/resolvers/is-visible-only-on-desktop.js";
import { handleFileUpload } from ".//handle-file-upload.js";
import { FILE_BUTTONS } from "./consts.js";
const getToolbarButtons = (config, services) => {
  const {
    context: { isMobile }
  } = services;
  const sizeButton = createNodeSizeButton({
    services,
    modalId: FILE_BUTTONS.size,
    options: ["SMALL", "CONTENT"]
  });
  const separator1 = createSeparator({
    visible: isVisibleOnlyOnDesktop(isMobile)
  });
  const alignmentButton = createNodeAlignmentButton({ services, modalId: FILE_BUTTONS.alignment });
  const separator2 = createSeparator({
    visible: isVisibleOnlyOnDesktop(isMobile)
  });
  const replaceButton = createReplaceButton({
    tooltip: "FileUploadReplaceButton_tooltip",
    command: ({ attributes: { selectedNode }, publicCommands, referenceElement }) => {
      handleFileUpload({
        config,
        services,
        publicCommands,
        nodeId: selectedNode.attrs.id,
        referenceElement
      });
    }
  });
  const separator3 = createSeparator();
  const deleteButton = createDeleteButton();
  if (services.context.environment === "wixel") {
    return [replaceButton, sizeButton, alignmentButton, deleteButton];
  }
  return [
    sizeButton,
    separator1,
    alignmentButton,
    separator2,
    replaceButton,
    separator3,
    deleteButton
  ];
};
export {
  getToolbarButtons
};
//# sourceMappingURL=get-toolbar-buttons.js.map
