import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { ActionName } from '../../../constants';
import { messages } from '../../../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
 */
export var ForbiddenAction = function ForbiddenAction(onClick, content, context, isDisabled) {
  return {
    name: ActionName.CustomAction,
    content: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[content], {
      values: context
    })),
    onClick: onClick,
    testId: 'smart-action-connect-other-account',
    isDisabled: isDisabled
  };
};