import React from 'react';
import classNames from 'classnames';
import { FontAwesomeIcon } from '../../../font-awesome-icon';
import { Tooltip, TOOLTIP_PLACEMENT_TYPES } from '../../../tooltip';
import { jsx as _jsx } from "react/jsx-runtime";
function EditorButton({
  icon,
  testId,
  onClick,
  className = '',
  tooltipText = null
}) {
  return /*#__PURE__*/_jsx(Tooltip, {
    content: tooltipText,
    placement: TOOLTIP_PLACEMENT_TYPES.TOP,
    children: /*#__PURE__*/_jsx("button", {
      "test-id": testId,
      "aria-label": tooltipText ?? undefined,
      className: classNames('button editor-button', className),
      onClick: onClick,
      type: "button",
      children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
        icon: icon
      })
    })
  });
}
export default EditorButton;