"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.verticalStyles = exports.styles = exports.horizontalStyles = exports.globalClasses = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");
var _DimensionFunctions = require("../../lib/styles/DimensionFunctions");



var _helpers = require("./helpers");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;

var globalClasses = exports.globalClasses = (0, _Emotion.prefix)('tab')({
  focus: 'focus'
});

var styles = exports.styles = (0, _Emotion.memoizeStyle)({
  rootSmall: function rootSmall(t) {
    return tabRoot(t, 'small');
  },

  rootMedium: function rootMedium(t) {
    return tabRoot(t, 'medium');
  },

  rootLarge: function rootLarge(t) {
    return tabRoot(t, 'large');
  },

  verticalSmall: function verticalSmall(t) {
    return tabVertical(t, 'small');
  },

  verticalMedium: function verticalMedium(t) {
    return tabVertical(t, 'medium');
  },

  verticalLarge: function verticalLarge(t) {
    return tabVertical(t, 'large');
  },

  focusSmall: function focusSmall(t) {
    return tabFocus(t, 'small');
  },

  focusMedium: function focusMedium(t) {
    return tabFocus(t, 'medium');
  },

  focusLarge: function focusLarge(t) {
    return tabFocus(t, 'large');
  },

  disabled: function disabled(t) {
    return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: color-mix(in srgb, ", ", transparent 50%);\n      cursor: default;\n    "])),
    t.tabTextColorDefault);


  },

  active: function active() {
    return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n      cursor: default;\n    "])));


  }
});

var horizontalStyles = exports.horizontalStyles = (0, _Emotion.memoizeStyle)({
  active: function active(t) {
    return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-bottom: ", " solid transparent;\n      }\n    "])),

    t.tabBorderWidth);


  },

  disabled: function disabled() {
    return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-bottom-color: transparent;\n      }\n    "])));




  },

  primary: function primary(t) {
    return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-bottom-color: ", ";\n      }\n    "])),

    t.tabColorHoverPrimary);


  },

  success: function success(t) {
    return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-bottom-color: ", ";\n      }\n    "])),

    t.tabColorHoverSuccess);


  },

  warning: function warning(t) {
    return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-bottom-color: ", ";\n      }\n    "])),

    t.tabColorHoverWarning);


  },

  error: function error(t) {
    return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-bottom-color: ", ";\n      }\n    "])),

    t.tabColorHoverError);


  }
});

var verticalStyles = exports.verticalStyles = (0, _Emotion.memoizeStyle)({
  active: function active(t) {
    return (0, _Emotion.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-left: ", " solid transparent;\n      }\n    "])),

    t.tabBorderWidth);


  },

  disabled: function disabled() {
    return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-left-color: transparent;\n      }\n    "])));




  },

  primary: function primary(t) {
    return (0, _Emotion.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-left-color: ", ";\n      }\n    "])),

    t.tabColorHoverPrimary);


  },

  success: function success(t) {
    return (0, _Emotion.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-left-color: ", ";\n      }\n    "])),

    t.tabColorHoverSuccess);


  },

  warning: function warning(t) {
    return (0, _Emotion.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-left-color: ", ";\n      }\n    "])),

    t.tabColorHoverWarning);


  },

  error: function error(t) {
    return (0, _Emotion.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &:hover {\n        border-left-color: ", ";\n      }\n    "])),

    t.tabColorHoverError);


  }
});

function tabRoot(t, size) {
  return (0, _Emotion.css)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteralLoose2.default)(["\n    border-bottom: ", " solid transparent;\n    box-sizing: border-box;\n    color: ", ";\n    cursor: pointer;\n    display: inline-block;\n    font-size: ", ";\n    line-height: ", ";\n    margin-left: ", ";\n    margin-right: ", ";\n    padding-bottom: calc(", " - ", ");\n    padding-top: ", ";\n    position: relative;\n    text-decoration: inherit;\n    transition: border-bottom ", " ", ";\n\n    &:hover {\n      outline: inherit;\n      border-bottom: ", " solid ", ";\n    }\n\n    &:focus {\n      outline: inherit;\n    }\n  "])),
  t.tabBorderWidth,

  t.tabTextColorDefault,


  (0, _helpers.fontSize)(t, size),
  (0, _helpers.lineHeight)(t, size),
  (0, _helpers.paddingX)(t, size),
  (0, _helpers.paddingX)(t, size),
  (0, _helpers.paddingY)(t, size), t.tabBorderWidth,
  (0, _helpers.paddingY)(t, size),


  t.transitionDuration, t.transitionTimingFunction,



  t.tabBorderWidth, t.tabColorHover);






}

function tabVertical(t, size) {
  return (0, _Emotion.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteralLoose2.default)(["\n    border-bottom: none;\n    border-left: ", " solid transparent;\n    display: block;\n    margin-left: 0;\n    margin-right: 0;\n    padding-left: ", ";\n    padding-right: ", ";\n\n    &:hover {\n      border-bottom: none;\n      border-left: ", " solid ", ";\n    }\n\n    .", " {\n      bottom: 0;\n      left: -", ";\n      right: 0;\n    }\n  "])),

  t.tabBorderWidth,



  (0, _DimensionFunctions.shift)((0, _helpers.paddingX)(t, size), "-" + t.tabBorderWidth),
  (0, _helpers.paddingX)(t, size),



  t.tabBorderWidth, t.tabColorHover,


  globalClasses.focus,

  t.tabBorderWidth);



}

function tabFocus(t, size) {
  return (0, _Emotion.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteralLoose2.default)(["\n    border: ", " solid ", ";\n    bottom: -", ";\n    left: -", ";\n    position: absolute;\n    right: -", ";\n    top: 0;\n  "])),
  t.tabOutlineWidth, t.tabColorFocus,
  t.tabBorderWidth,
  (0, _helpers.paddingX)(t, size),

  (0, _helpers.paddingX)(t, size));


}