import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { messages } from '../../../messages';
export var ForbiddenAction = function ForbiddenAction(handler) {
  var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'connect-other-account';
  var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : messages.try_another_account;
  var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  return {
    id: id,
    text: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
      values: values
    })),
    promise: function promise() {
      return new Promise(function (resolve) {
        return resolve(handler());
      });
    },
    buttonAppearance: 'default'
  };
};