"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getItemFontSize = exports.getItemColor = exports.getItemBackgroundColor = void 0;

var _branding = require("../../../../mixins/branding");

var _typography = require("../../../../mixins/typography");

var getItemBackgroundColor = function getItemBackgroundColor(selector) {
  return function (_ref) {
    var danger = _ref.danger;

    if (danger) {
      return (0, _branding.getPaletteColor)('error-fg');
    }

    switch (selector) {
      case 'active':
        return (0, _branding.getPaletteColor)('brand-secondary-fg');

      case 'hover':
        return (0, _branding.getPaletteColor)('brand-secondary-base');

      default:
        return undefined;
    }
  };
};

exports.getItemBackgroundColor = getItemBackgroundColor;

var getItemColor = function getItemColor(_ref2) {
  var danger = _ref2.danger,
      colorName = _ref2.colorName;
  var originalColor = colorName ? (0, _branding.getPaletteColor)(colorName) : 'inherit';
  return danger ? (0, _branding.getPaletteColor)('error-fg') : originalColor;
};

exports.getItemColor = getItemColor;

var getItemFontSize = function getItemFontSize(_ref3) {
  var theme = _ref3.theme;
  return (0, _typography.getFontSize)({
    theme: theme,
    fontSize: 'f1'
  });
};

exports.getItemFontSize = getItemFontSize;