'use strict';

var _rollupPluginBabelHelpers = require('../_rollupPluginBabelHelpers-acf412a3.js');
var React = require('react');
var useLongPress = require('../useLongPress-cf56e64a.js');
var utils = require('../utils-5aa0708e.js');
require('../MediaQueryContext-fad211ad.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
