"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getTabularStyles = exports.getFontWeight = exports.getFontFamily = exports.getFontSize = exports.getTextTransform = exports.getTextDecoration = exports.getFontStyle = exports.getTextAlign = void 0;

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

var tabularStyles = (0, _styledComponents.css)(["font-feature-settings:'tnum';font-kerning:none;"]);

var getTextAlign = function getTextAlign(_ref) {
  var align = _ref.align;
  return align;
};

exports.getTextAlign = getTextAlign;

var getFontStyle = function getFontStyle(_ref2) {
  var italic = _ref2.italic;
  return italic ? 'italic' : undefined;
};

exports.getFontStyle = getFontStyle;

var getTextDecoration = function getTextDecoration(_ref3) {
  var underlined = _ref3.underlined;
  return underlined ? 'underline' : undefined;
};

exports.getTextDecoration = getTextDecoration;

var getTextTransform = function getTextTransform(_ref4) {
  var casing = _ref4.casing;
  return casing;
};

exports.getTextTransform = getTextTransform;

var getFontSize = function getFontSize(_ref5) {
  var theme = _ref5.theme,
      _ref5$fontSize = _ref5.fontSize,
      fontSize = _ref5$fontSize === void 0 ? 'f2' : _ref5$fontSize;
  return theme.typescale[fontSize];
};

exports.getFontSize = getFontSize;

var getFontFamily = function getFontFamily(_ref6) {
  var theme = _ref6.theme,
      _ref6$face = _ref6.face,
      face = _ref6$face === void 0 ? 'sans' : _ref6$face;
  return theme.fonts[face];
};

exports.getFontFamily = getFontFamily;

var getFontWeight = function getFontWeight(_ref7) {
  var _ref7$bold = _ref7.bold,
      bold = _ref7$bold === void 0 ? false : _ref7$bold;
  return bold ? '700' : '400';
};

exports.getFontWeight = getFontWeight;

var getTabularStyles = function getTabularStyles(_ref8) {
  var _ref8$tabular = _ref8.tabular,
      tabular = _ref8$tabular === void 0 ? false : _ref8$tabular;
  return tabular ? tabularStyles : '';
};

exports.getTabularStyles = getTabularStyles;