"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
var _constants = require("../../../constants");
var extractJiraTaskIcon = function extractJiraTaskIcon(taskType, label) {
  var getLabel = function getLabel(hardcodedLabel) {
    return (0, _platformFeatureFlags.fg)('platform_navx_smart_link_icon_label_a11y') ? hardcodedLabel : label || 'Task';
  };
  switch (taskType) {
    case 'JiraBug':
      return {
        icon: _constants.IconType.Bug,
        label: getLabel('Bug')
      };
    case 'JiraChange':
      return {
        icon: _constants.IconType.Change,
        label: getLabel('Change')
      };
    case 'JiraEpic':
      return {
        icon: _constants.IconType.Epic,
        label: getLabel('Epic')
      };
    case 'JiraIncident':
      return {
        icon: _constants.IconType.Incident,
        label: getLabel('Incident')
      };
    case 'JiraProblem':
      return {
        icon: _constants.IconType.Problem,
        label: getLabel('Problem')
      };
    case 'JiraServiceRequest':
      return {
        icon: _constants.IconType.ServiceRequest,
        label: getLabel('Service request')
      };
    case 'JiraStory':
      return {
        icon: _constants.IconType.Story,
        label: getLabel('Story')
      };
    case 'JiraSubTask':
      return {
        icon: _constants.IconType.SubTask,
        label: getLabel('Sub-task')
      };
    case 'JiraTask':
    default:
      return {
        icon: _constants.IconType.Task,
        label: getLabel('Task')
      };
  }
};
var _default = exports.default = extractJiraTaskIcon;