import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { Box, Text } from '@atlaskit/primitives/compiled';
import { messages } from '../../../messages';
// TODO: remove when social-proof-3p-unauth-block-fg is cleaned up
var SocialProofMessage = function SocialProofMessage(_ref) {
  var tier = _ref.tier,
    connectedPct = _ref.connectedPct,
    providerName = _ref.providerName,
    _ref$testId = _ref.testId,
    testId = _ref$testId === void 0 ? 'smart-block-social-proof-message' : _ref$testId;
  var message = tier === 'not-low' ? messages.pre_auth_block_social_proof_not_low : messages.pre_auth_block_social_proof_low;
  return /*#__PURE__*/React.createElement(Box, {
    testId: testId
  }, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
    values: {
      percentage: connectedPct !== null && connectedPct !== void 0 ? connectedPct : 0,
      provider: providerName,
      b: function b(chunks) {
        return /*#__PURE__*/React.createElement(Text, {
          as: "strong",
          weight: "bold"
        }, chunks);
      }
    }
  })));
};
export default SocialProofMessage;