'use strict';

var _rollupPluginBabelHelpers = require('../_rollupPluginBabelHelpers-09eba4f3.js');
var React = require('react');
var useLongPress = require('../useLongPress-e9001ef5.js');
var utils = require('../utils-6916bad3.js');
require('../MediaQueryContext-d15578f3.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

const ReactionButton = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => {
  const {
    className,
    width,
    height,
    selected,
    dataSbId = '',
    onClick,
    children
  } = props;
  const onClickHandler = useLongPress.useLongPress({
    onLongPress: utils.noop,
    onClick
  }, {
    shouldPreventDefault: true,
    shouldStopPropagation: true
  });
  return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers._extends({
    className: [...(Array.isArray(className) ? className : [className]), `sendbird-reaction-button${selected ? '--selected' : ''}`].join(' '),
    ref: ref,
    role: "button",
    style: {
      width,
      height
    }
  }, onClickHandler, {
    tabIndex: 0,
    "data-sb-id": dataSbId
  }), /*#__PURE__*/React__default["default"].createElement("div", {
    className: "sendbird-reaction-button__inner"
  }, children));
});

module.exports = ReactionButton;
//# sourceMappingURL=ReactionButton.js.map
