"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.toAction = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactIntl = require("react-intl");
var toAction = exports.toAction = function toAction(action, invokeClientAction, message, id) {
  return {
    id: id,
    text: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, message),
    invoke: function invoke() {
      return invokeClientAction(action);
    }
  };
};