import React from 'react';
import { useIntl } from 'react-intl-next';
import { IconButton } from '@atlaskit/button/new';
import Tooltip from '@atlaskit/tooltip';
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
var LinkInfoButton = function LinkInfoButton(_ref) {
  var content = _ref.content,
    icon = _ref.icon,
    label = _ref.label,
    onClick = _ref.onClick,
    testId = _ref.testId;
  var onMouseDown = useMouseDownEvent();
  var _useIntl = useIntl(),
    formatMessage = _useIntl.formatMessage;
  return /*#__PURE__*/React.createElement(Tooltip, {
    content: content,
    hideTooltipOnClick: true,
    tag: "span",
    testId: "".concat(testId, "-tooltip")
  }, /*#__PURE__*/React.createElement(IconButton, {
    appearance: "subtle",
    icon: icon,
    label: formatMessage(label),
    onClick: onClick,
    onMouseDown: onMouseDown,
    testId: "".concat(testId, "-button")
  }));
};
export default LinkInfoButton;