import _defineProperty from "@babel/runtime/helpers/defineProperty";

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

var createTypography = function createTypography(_ref) {
  var _objectSpread2, _objectSpread3, _objectSpread4, _objectSpread5, _objectSpread6, _objectSpread7;

  var typography = _ref.typography,
      breakpoints = _ref.breakpoints;
  var variants = {
    title: _objectSpread((_objectSpread2 = {
      fontFamily: typography.font1,
      fontSize: 21,
      fontWeight: 700,
      lineHeight: 1
    }, _defineProperty(_objectSpread2, breakpoints.up("md"), {
      fontSize: 24
    }), _defineProperty(_objectSpread2, breakpoints.up("lg"), {
      fontSize: 28
    }), _objectSpread2), typography.variants.title),
    subtitle: _objectSpread((_objectSpread3 = {
      fontFamily: typography.font2,
      fontSize: 18,
      fontWeight: 400,
      lineHeight: 1.25
    }, _defineProperty(_objectSpread3, breakpoints.up("sm"), {
      fontSize: 21
    }), _defineProperty(_objectSpread3, breakpoints.up("md"), {
      fontSize: 24
    }), _defineProperty(_objectSpread3, breakpoints.up("lg"), {
      fontSize: 28
    }), _objectSpread3), typography.variants.subtitle),
    title2: _objectSpread((_objectSpread4 = {
      fontFamily: typography.font1,
      fontSize: 14,
      fontWeight: 600,
      lineHeight: 1.5
    }, _defineProperty(_objectSpread4, breakpoints.up("md"), {
      fontSize: 18
    }), _defineProperty(_objectSpread4, breakpoints.up("lg"), {
      fontSize: 21
    }), _objectSpread4), typography.variants.title2),
    paragraph: _objectSpread((_objectSpread5 = {
      fontFamily: typography.font2,
      fontSize: 14,
      fontWeight: 400,
      lineHeight: 1.5
    }, _defineProperty(_objectSpread5, breakpoints.up("md"), {
      fontSize: 18
    }), _defineProperty(_objectSpread5, breakpoints.up("lg"), {
      fontSize: 21
    }), _objectSpread5), typography.variants.paragraph),
    inputText: _objectSpread((_objectSpread6 = {
      fontFamily: typography.font1,
      fontSize: 14,
      fontWeight: 600,
      lineHeight: 1.5
    }, _defineProperty(_objectSpread6, breakpoints.up("md"), {
      fontSize: 16
    }), _defineProperty(_objectSpread6, breakpoints.up("lg"), {
      fontSize: 18
    }), _objectSpread6), typography.variants.inputText),
    label: _objectSpread((_objectSpread7 = {
      fontFamily: typography.font1,
      fontSize: 14,
      fontWeight: 600,
      lineHeight: 1.5
    }, _defineProperty(_objectSpread7, breakpoints.up("md"), {
      fontSize: 16
    }), _defineProperty(_objectSpread7, breakpoints.up("lg"), {
      fontSize: 18
    }), _objectSpread7), typography.variants.label),
    small: _objectSpread(_defineProperty({
      fontFamily: typography.font1,
      fontSize: 12,
      fontWeight: 500,
      lineHeight: 1.75
    }, breakpoints.up("lg"), {
      fontSize: 14
    }), typography.variants.small),
    smallItalic: _objectSpread(_defineProperty({
      fontFamily: typography.font1,
      fontSize: 12,
      fontStyle: "italic",
      fontWeight: 500,
      lineHeight: 1.75
    }, breakpoints.up("lg"), {
      fontSize: 14
    }), typography.variants.smallItalick),
    caption: _objectSpread(_defineProperty({
      fontFamily: typography.font1,
      fontSize: 12,
      fontWeight: 400,
      lineHeight: 1.75,
      letterSpacing: ".1em",
      textTransform: "uppercase"
    }, breakpoints.up("lg"), {
      fontSize: 14
    }), typography.variants.caption)
  };
  return _objectSpread(_objectSpread({}, typography), {}, {
    variants: variants
  });
};

export default createTypography;