"use strict";

/*
Copyright 2021 Q-CTRL. All rights reserved.

Licensed under the Q-CTRL Terms of service (the "License"). Unauthorized
copying or use of this file, via any medium, is strictly prohibited.
Proprietary and confidential. You may not use this file except in compliance
with the License. You may obtain a copy of the License at

     https://q-ctrl.com/terms

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS. See the
License for the specific language.
*/
var plugin = require("tailwindcss/plugin");

module.exports = function (_ref) {
  var addBase = _ref.addBase,
      addUtilities = _ref.addUtilities,
      theme = _ref.theme;
  var baseTypography = {
    h1: {
      fontSize: theme("fontSize.4xl"),
      lineHeight: theme("fontSize.4xl[1].lineHeight")
    },
    h2: {
      fontSize: theme("fontSize.3xl"),
      lineHeight: theme("fontSize.3xl[1].lineHeight")
    },
    h3: {
      fontSize: theme("fontSize.2xl"),
      lineHeight: theme("fontSize.2xl[1].lineHeight")
    },
    h4: {
      fontSize: theme("fontSize.xl"),
      lineHeight: theme("fontSize.xl[1].lineHeight")
    },
    h5: {
      fontSize: theme("fontSize.base"),
      lineHeight: theme("fontSize.base[1].lineHeight")
    },
    h6: {
      fontSize: theme("fontSize.xs"),
      lineHeight: theme("fontSize.xs[1].lineHeight")
    },
    "h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6": {
      fontFamily: theme("fontFamily.sans"),
      fontWeight: theme("fontWeight.medium")
    },
    ".h1, .h2, .h3, .h4, .h5, .h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6": {
      display: "block",
      textTransform: "uppercase"
    },
    ".h1, .h2, .h3, .h4, .h5, .h6": {
      letterSpacing: theme("letterSpacing.wider")
    },
    ".display-1, .display-2, .display-3, .display-4, .display-5, .display-6": {
      fontFamily: theme("fontFamily.display"),
      fontWeight: theme("fontWeight.normal"),
      letterSpacing: theme("letterSpacing.widest")
    },
    ".lead": {
      fontSize: theme("fontSize.lg"),
      fontWeight: theme("fontWeight.light"),
      lineHeight: theme("lineHeight.xl")
    },
    ".sr-only": {
      position: "absolute",
      width: theme("width.px"),
      height: theme("height.px"),
      margin: "-".concat(theme("margin.px")),
      padding: 0,
      overflow: "hidden",
      whiteSpace: "nowrap",
      borderWidth: 0,
      clip: "rect(0 0 0 0)",
      clippath: "polygon(0px 0px, 0px 0px, 0px 0px)"
    },
    pre: {
      display: "block",
      fontSize: theme("fontSize[87.5]"),
      padding: theme("frame.md"),
      backgroundColor: theme("colors.gray.0")
    },
    "code, kbd": {
      fontSize: theme("fontSize[87.5]"),
      wordWrap: "break-word"
    },
    "pre code": {
      fontSize: "inherit",
      wordBreak: "normal"
    }
  }; // console.log('Font Sizes: ',theme("fontSize.4xl[1].lineHeight"))

  var headingSizes = {
    ".h1": {
      fontSize: theme("fontSize.4xl"),
      lineHeight: theme("fontSize.4xl[1].lineHeight")
    },
    ".h2": {
      fontSize: theme("fontSize.3xl"),
      lineHeight: theme("fontSize.3xl[1].lineHeight")
    },
    ".h3": {
      fontSize: theme("fontSize.2xl"),
      lineHeight: theme("fontSize.2xl[1].lineHeight")
    },
    ".h4": {
      fontSize: theme("fontSize.xl"),
      lineHeight: theme("fontSize.xl[1].lineHeight")
    },
    ".h5": {
      fontSize: theme("fontSize.base"),
      lineHeight: theme("fontSize.base[1].lineHeight")
    },
    ".h6": {
      fontSize: theme("fontSize.xs"),
      lineHeight: theme("fontSize.xs[1].lineHeight")
    },
    ".display-1": {
      fontSize: theme("fontSize.7xl"),
      lineHeight: theme("fontSize.7xl[1].lineHeight")
    },
    ".display-2": {
      fontSize: theme("fontSize.6xl"),
      lineHeight: theme("fontSize.6xl[1].lineHeight")
    },
    ".display-3": {
      fontSize: theme("fontSize.5xl"),
      lineHeight: theme("fontSize.5xl[1].lineHeight")
    },
    ".display-4": {
      fontSize: theme("fontSize.2xl"),
      lineHeight: theme("fontSize.2xl[1].lineHeight")
    },
    ".display-5": {
      fontSize: theme("fontSize.base"),
      lineHeight: theme("fontSize.base[1].lineHeight")
    },
    ".display-6": {
      fontSize: theme("fontSize.xs"),
      lineHeight: theme("fontSize.xs[1].lineHeight")
    }
  };
  addBase(baseTypography), addUtilities(headingSizes, {
    variants: ["responsive"]
  });
};