"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _RichTextToolbarButtonSt = require("./RichTextToolbarButton.st.css.js");
var _Tooltip = _interopRequireDefault(require("../../Tooltip"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/RichTextInputArea/Toolbar/RichTextToolbarButton.jsx",
  _this = void 0;
var RichTextToolbarButton = function RichTextToolbarButton(_ref) {
  var dataHook = _ref.dataHook,
    onClick = _ref.onClick,
    tooltipText = _ref.tooltipText,
    isActive = _ref.isActive,
    isDisabled = _ref.isDisabled,
    children = _ref.children;
  return /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
    content: tooltipText,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 13,
      columnNumber: 3
    }
  }, /*#__PURE__*/_react["default"].createElement("button", {
    type: "button",
    "data-active": isActive,
    "data-hook": dataHook,
    className: (0, _RichTextToolbarButtonSt.st)(_RichTextToolbarButtonSt.classes.button, {
      disabled: isDisabled,
      active: !isDisabled && isActive
    }),
    onClick: isDisabled ? undefined : onClick,
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 14,
      columnNumber: 5
    }
  }, children));
};
var _default = exports["default"] = RichTextToolbarButton;