"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.RetryAction = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var _constants = require("../../../constants");
var _messages = require("../../../messages");
/**
 * Returns a CustomActionItem with a "Retry" default message
 *
 * @see CustomActionItem
 * @param onRetry a function that will be called on the click of the "Retry" button
 */
var RetryAction = exports.RetryAction = function RetryAction(onRetry) {
  return {
    name: _constants.ActionName.CustomAction,
    onClick: onRetry,
    content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.try_again),
    testId: 'smart-action-try-again'
  };
};