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


var _Link = require("./Link.mixins");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;

var line = (0, _Emotion.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n  0% {\n    text-decoration-color: inherit;\n  }\n  100% {\n    text-decoration-color: transparent;\n  }\n"])));








var oldLineText = function oldLineText(t) {
  var delay = parseFloat(t.linkTextUnderlineOpacity) - 1;
  return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n    animation: ", " 1s linear !important; // override creevey\n    animation-play-state: paused !important;\n    animation-delay: ", "s !important;\n    animation-fill-mode: forwards !important;\n  "])),
  line,

  delay);


};

var styles = exports.styles = (0, _Emotion.memoizeStyle)({
  root: function root(t) {
    return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n      cursor: pointer;\n      position: relative;\n\n      border-radius: 1px;\n      text-decoration: ", ";\n      text-decoration-style: ", ";\n      text-underline-offset: ", ";\n      text-decoration-thickness: ", ";\n      transition: text-decoration-color ", " ", ";\n      @supports (text-decoration-color: ", ") {\n        text-decoration-color: ", ";\n        &:hover {\n          text-decoration-color: currentColor;\n          text-decoration-style: ", ";\n        }\n      }\n      @supports not (text-decoration-color: ", ") {\n        ", ";\n        &:hover {\n          text-decoration-style: ", ";\n          animation: none !important;\n        }\n      }\n    "])),




    t.linkTextDecoration,
    t.linkTextDecorationStyle,
    t.linkTextUnderlineOffset,
    t.linkTextDecorationThickness,
    t.transitionDuration, t.transitionTimingFunction,
    t.linkTextDecorationColor,
    t.linkTextDecorationColor,


    t.linkHoverTextDecorationStyle,


    t.linkTextDecorationColor,
    oldLineText(t),

    t.linkHoverTextDecorationStyle);




  },
  lineFocus: function lineFocus(t) {
    return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", ";\n    "])),
    t.linkHoverColor);

  },

  lineFocusSuccess: function lineFocusSuccess(t) {
    return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", " !important;\n    "])),
    t.linkSuccessHoverColor);

  },

  lineFocusDanger: function lineFocusDanger(t) {
    return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", " !important;\n    "])),
    t.linkDangerHoverColor);

  },

  lineFocusGrayed: function lineFocusGrayed(t) {
    return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", " !important;\n    "])),
    t.linkGrayedHoverColor);

  },

  button: function button(t) {
    return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n      display: inline-block;\n      line-height: ", ";\n      padding-left: ", ";\n      padding-right: ", ";\n    "])),

    t.linkButtonLineHeight,
    t.linkButtonPaddingX,
    t.linkButtonPaddingX);

  },

  buttonOpened: function buttonOpened(t) {
    return (0, _Emotion.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteralLoose2.default)(["\n      background: ", ";\n    "])),
    t.btnDefaultActiveBg);

  },

  arrow: function arrow() {
    return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n      border: 4px solid transparent;\n      border-bottom-width: 0;\n      border-top-color: #a0a0a0;\n      display: inline-block;\n      margin-bottom: 3px;\n      margin-left: 3px;\n      vertical-align: middle;\n    "])));








  },

  default: function _default(t) {
    return (0, _Emotion.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Link.linkUseColorsMixin)(t.linkColor, t.linkHoverColor, t.linkActiveColor));

  },

  success: function success(t) {
    return (0, _Emotion.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Link.linkUseColorsMixin)(t.linkSuccessColor, t.linkSuccessHoverColor, t.linkSuccessActiveColor));

  },

  danger: function danger(t) {
    return (0, _Emotion.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Link.linkUseColorsMixin)(t.linkDangerColor, t.linkDangerHoverColor, t.linkDangerActiveColor));

  },

  grayed: function grayed(t) {
    return (0, _Emotion.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Link.linkUseColorsMixin)(t.linkGrayedColor, t.linkGrayedHoverColor, t.linkGrayedActiveColor));

  },

  useGrayedFocus: function useGrayedFocus(t) {
    return (0, _Emotion.css)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", ";\n    "])),
    t.linkDisabledColor);

  },

  focus: function focus(t) {
    return (0, _Emotion.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteralLoose2.default)(["\n      text-decoration: ", ";\n      outline: ", ";\n    "])),
    t.linkHoverTextDecoration,
    t.linkFocusOutline);

  },

  disabled: function disabled(t) {
    return (0, _Emotion.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n\n      color: ", " !important; // override root color\n\n      &:hover {\n        color: ", ";\n        text-decoration-color: ", ";\n      }\n    "])),
    (0, _Link.linkDisabledMixin)(),

    t.linkDisabledColor,


    t.linkDisabledColor,
    t.linkTextDecorationColor);


  },

  icon: function icon() {
    return (0, _Emotion.css)(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteralLoose2.default)(["\n      display: inline-block;\n    "])));


  },

  iconLeft: function iconLeft(t) {
    return (0, _Emotion.css)(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteralLoose2.default)(["\n      margin-right: ", ";\n    "])),
    t.linkIconMarginRight);

  },

  iconRight: function iconRight(t) {
    return (0, _Emotion.css)(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteralLoose2.default)(["\n      margin-left: ", ";\n    "])),
    t.linkIconMarginLeft);

  },

  warning: function warning(t) {
    return (0, _Emotion.css)(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteralLoose2.default)(["\n      background-color: ", ";\n      box-shadow: 0 0 0 2px ", ";\n    "])),
    t.btnWarningSecondary,
    t.btnWarningSecondary);

  },

  error: function error(t) {
    return (0, _Emotion.css)(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteralLoose2.default)(["\n      background-color: ", ";\n      box-shadow: 0 0 0 2px ", ";\n    "])),
    t.btnErrorSecondary,
    t.btnErrorSecondary);

  }
});