"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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var _messages = require("../../../messages");
var _actionButton = require("../../InlineCard/common/action-button");
var _Hyperlink = _interopRequireDefault(require("../Hyperlink"));
var _excluded = ["onAuthorize", "provider", "showConnectBtn"];
var HyperlinkUnauthorizedView = function HyperlinkUnauthorizedView(_ref) {
  var onAuthorize = _ref.onAuthorize,
    provider = _ref.provider,
    showConnectBtn = _ref.showConnectBtn,
    props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Hyperlink.default, props), showConnectBtn && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
    onClick: onAuthorize,
    testId: "button-connect-account"
  }, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, _messages.messages.connect_link_account_card_name, {
    values: {
      context: provider === null || provider === void 0 ? void 0 : provider.text
    }
  })))));
};
var _default = exports.default = HyperlinkUnauthorizedView;