import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { messages } from '../../../messages';
export const ForbiddenAction = (handler, id = 'connect-other-account', message = messages.try_another_account, values = {}) => ({
  id,
  text: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
    values: values
  })),
  promise: () => new Promise(resolve => resolve(handler())),
  buttonAppearance: 'default'
});