"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var _compiled = require("@atlaskit/primitives/compiled");
var _messages = require("../../../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.messages.pre_auth_block_social_proof_not_low : _messages.messages.pre_auth_block_social_proof_low;
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
    testId: testId
  }, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, message, {
    values: {
      percentage: connectedPct !== null && connectedPct !== void 0 ? connectedPct : 0,
      provider: providerName,
      b: function b(chunks) {
        return /*#__PURE__*/_react.default.createElement(_compiled.Text, {
          as: "strong",
          weight: "bold"
        }, chunks);
      }
    }
  })));
};
var _default = exports.default = SocialProofMessage;