"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pickTooltipContent = exports.pickStatus = void 0;

var _react = _interopRequireDefault(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _components = require("@looker/components");

var _icons = require("@looker/icons");

var _VisibilityOff = require("@styled-icons/material/VisibilityOff");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var pickStatus = status => {
  var title = "".concat(status.toLowerCase(), " item");

  switch (status.toLowerCase()) {
    case 'beta':
      return _react.default.createElement(StatusBeta, {
        "aria-label": title
      }, "\u03B2");

    case 'experimental':
      {
        return _react.default.createElement(_components.Icon, {
          title: title,
          "aria-label": title,
          icon: _react.default.createElement(_icons.Beaker, null)
        });
      }

    case 'alpha':
      {
        return _react.default.createElement(_components.Icon, {
          title: title,
          "aria-label": title,
          icon: _react.default.createElement(_icons.Beaker, null)
        });
      }

    case 'undocumented':
      {
        return _react.default.createElement(_components.Icon, {
          title: title,
          "aria-label": title,
          icon: _react.default.createElement(_VisibilityOff.VisibilityOff, null)
        });
      }

    case 'deprecated':
      return _react.default.createElement(_components.Status, {
        "aria-label": title,
        intent: "critical",
        size: "small"
      });

    case 'stable':
      return _react.default.createElement(_components.Status, {
        "aria-label": title,
        intent: "positive",
        size: "small"
      });

    default:
      return _react.default.createElement(_components.Status, {
        "aria-label": "unknown status endpoint",
        intent: "neutral",
        size: "small"
      });
  }
};

exports.pickStatus = pickStatus;

var pickTooltipContent = status => {
  switch (status.toLowerCase()) {
    case 'beta':
      return 'This beta item is under development and subject to change.';

    case 'experimental':
      return 'This experimental item is not fully developed and may be significantly changed or completely removed in future releases.';

    case 'deprecated':
      return 'This item has been deprecated and will be removed in the future.';

    case 'stable':
      return 'This item is considered stable for this API version.';

    case 'undocumented':
      return 'This is an internal-only item.';

    default:
      return 'This item has no status associated with it.';
  }
};

exports.pickTooltipContent = pickTooltipContent;

var StatusBeta = _styledComponents.default.div.withConfig({
  displayName: "utils__StatusBeta",
  componentId: "ugxyok-0"
})(["display:flex;align-items:center;justify-content:center;font-size:", ";color:", ";width:1.125rem;height:1.125rem;"], _ref => {
  var {
    theme
  } = _ref;
  return theme.fontSizes.xxsmall;
}, _ref2 => {
  var {
    theme
  } = _ref2;
  return theme.colors.neutral;
});
//# sourceMappingURL=utils.js.map