"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getSpanFontWeight = exports.getSpanFontFamily = exports.getSpanFontSize = exports.getForegroundColor = void 0;

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

var getForegroundColor = function getForegroundColor(_ref) {
  var theme = _ref.theme,
      colorName = _ref.colorName;
  return colorName ? (0, _branding.getPaletteColor)(colorName)({
    theme: theme
  }) : undefined;
};

exports.getForegroundColor = getForegroundColor;

var getSpanFontSize = function getSpanFontSize(_ref2) {
  var theme = _ref2.theme,
      fontSize = _ref2.fontSize;
  return fontSize && theme.typescale[fontSize] ? theme.typescale[fontSize] : undefined;
};

exports.getSpanFontSize = getSpanFontSize;

var getSpanFontFamily = function getSpanFontFamily(_ref3) {
  var theme = _ref3.theme,
      face = _ref3.face;
  return face && theme.fonts[face] ? theme.fonts[face] : undefined;
};

exports.getSpanFontFamily = getSpanFontFamily;

var getSpanFontWeight = function getSpanFontWeight(_ref4) {
  var _ref4$bold = _ref4.bold,
      bold = _ref4$bold === void 0 ? false : _ref4$bold;
  return bold ? '700' : undefined;
};

exports.getSpanFontWeight = getSpanFontWeight;