"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ForbiddenAction = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var _constants = require("../../../constants");
var _messages = require("../../../messages");
/**
 * Returns a CustomActionItem with a "Try Another Account" default message
 *
 * @see CustomActionItem
 * @param onClick a function that will be called on the click of the button
 * @param content is a message key for a message to be displayed in the action
 * @param context is a variable for a message in case a message contains a placeholder
 */
var ForbiddenAction = exports.ForbiddenAction = function ForbiddenAction(onClick, content, context, isDisabled) {
  return {
    name: _constants.ActionName.CustomAction,
    content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, (0, _extends2.default)({}, _messages.messages[content], {
      values: context
    })),
    onClick: onClick,
    testId: 'smart-action-connect-other-account',
    isDisabled: isDisabled
  };
};