/*
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.
*/
const {
  rem
} = require("../utilities/convertNumber");

const _ = require("lodash");

const boxShadow = require("./boxShadow");
/*
Font Families:
Overrides Tailwind's default font families.
*/


const fontFamilies = {
  sans: 'Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',
  serif: 'Georgia, Cambria, "Times New Roman", Times, serif',
  mono: '"Roboto Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
  display: '"Magistral", Roboto, sans-serif'
};
/*
Font Sizes:
Overides Tailwind's default sizes with Q-CTRL type-scale.
*/

const fontSizes = {
  87.5: "87.5%",
  "3xs": [rem(8), {
    lineHeight: rem(12)
  }],
  "2xs": [rem(10), {
    lineHeight: rem(16)
  }],
  xs: [rem(12), {
    lineHeight: rem(20)
  }],
  sm: [rem(14), {
    lineHeight: rem(24)
  }],
  base: [rem(16), {
    lineHeight: rem(28)
  }],
  lg: [rem(18), {
    lineHeight: rem(28)
  }],
  xl: [rem(20), {
    lineHeight: rem(32)
  }],
  "2xl": [rem(24), {
    lineHeight: rem(36)
  }],
  "3xl": [rem(28), {
    lineHeight: rem(40)
  }],
  "4xl": [rem(32), {
    lineHeight: rem(48)
  }],
  "5xl": [rem(36), {
    lineHeight: rem(48)
  }],
  "6xl": [rem(48), {
    lineHeight: rem(64)
  }],
  "7xl": [rem(56), {
    lineHeight: rem(72)
  }]
};
/*
Line Heights:
Overides Tailwind's default line-heights.
*/

const lineHeights = {
  "3xs": rem(12),
  "2xs": rem(16),
  xs: rem(20),
  sm: rem(24),
  md: rem(28),
  lg: rem(32),
  xl: rem(36),
  "2xl": rem(40),
  "3xl": rem(48),
  "4xl": rem(56),
  "5xl": rem(64),
  "6xl": rem(72)
};
/*
Letter Spacing:
Overides Tailwind's default letter-spacing.
*/

const letterSpacing = {
  tighter: "-0.08em",
  tight: "-0.05em",
  compressed: "-0.025em",
  normal: "0",
  loose: "0.025em",
  wide: "0.05em",
  wider: "0.08em",
  widest: "0.12em",
  extream: "0.27em"
};
/*
Text Orientation:
Adds `.text-oriention-*` classes to Tailwind
*/

const textOrientations = {
  mixed: "mixed",
  upright: "upright",
  "sideways-right": "sideways-right",
  sideways: "sideways",
  "use-glyph-orientation": "use-glyph-orientation",
  inherit: "inherit",
  initial: "initial",
  unset: "unset"
};
/*
Writting Mode:
Adds `.writting-mode-*` classes to Tailwind
*/

const writingModes = {
  "horizontal-tb": "horizontal-tb",
  "vertical-rl": "vertical-rl",
  "vertical-lr": "vertical-lr",
  inherit: "inherit",
  initial: "initial",
  unset: "unset"
};
/*
Text Shadows:
Adds `.text-shadow-*` classes to Tailwind
*/

const textShadow = _.omit(boxShadow, ["inner", "inner-sm", "dark-inner", "dark-inner-sm", "outline", "focus"]);

module.exports = {
  fontFamilies,
  fontSizes,
  lineHeights,
  letterSpacing,
  textOrientations,
  writingModes,
  textShadow
};