"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getFollowActionErrorMessage = void 0;
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
var _messages = require("../../../../../messages");
var getFollowActionErrorMessage = exports.getFollowActionErrorMessage = function getFollowActionErrorMessage() {
  var isProject = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  var isFollow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  if (isProject && isFollow) {
    return _featureGateJsClient.default.getExperimentValue('project-terminology-refresh', 'isEnabled', false) ? _messages.messages.follow_project_errorGalaxia : _messages.messages.follow_project_error;
  }
  if (isProject && !isFollow) {
    return _featureGateJsClient.default.getExperimentValue('project-terminology-refresh', 'isEnabled', false) ? _messages.messages.unfollow_project_errorGalaxia : _messages.messages.unfollow_project_error;
  }
  if (!isProject && isFollow) {
    return _messages.messages.follow_goal_error;
  }
  if (!isProject && !isFollow) {
    return _messages.messages.unfollow_goal_error;
  }
  return _messages.messages.generic_error_message;
};