import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/esm/taggedTemplateLiteralLoose";
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
import { css } from "../../../lib/theming/Emotion";
import { globalClasses } from "../Button.styles";
var getBtnPadding = function getBtnPadding(paddingY, paddingX) {
  return paddingY + " " + paddingX + " " + paddingY;
};
export var buttonUseMixin = function buttonUseMixin(btnBackground, btnBackgroundStart, btnBackgroundEnd, color, borderColor, borderWidth) {
  var hasGradient = btnBackgroundStart !== btnBackgroundEnd;
  return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n    background-color: ", ";\n    background-image: ", ";\n    color: ", ";\n    box-shadow: 0 0 0 ", " ", ";\n\n    :enabled:hover,\n    :enabled {\n      .", " svg {\n        color: ", ";\n      }\n    }\n  "])), hasGradient ? "initial" : btnBackground, hasGradient ? "linear-gradient(" + btnBackgroundStart + ", " + btnBackgroundEnd + ")" : "none", color, borderWidth, borderColor, globalClasses.arrow, color);
};
export var buttonHoverMixin = function buttonHoverMixin(btnBackground, btnBackgroundStart, btnBackgroundEnd, color, borderColor, borderWidth) {
  var hasGradient = btnBackgroundStart !== btnBackgroundEnd;
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n    background-color: ", ";\n    background-image: ", ";\n    box-shadow: 0 0 0 ", " ", ";\n    color: ", ";\n  "])), hasGradient ? "initial" : btnBackground, hasGradient ? "linear-gradient(" + btnBackgroundStart + ", " + btnBackgroundEnd + ")" : "none", borderWidth, borderColor, color);
};
export var buttonActiveMixin = function buttonActiveMixin(btnBackground, btnShadow, borderColor, borderWidth) {
  return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n    &,\n    &:hover {\n      background-image: none !important; // override :hover styles\n      background-color: ", " !important; // override :hover styles\n      box-shadow: 0 0 0 ", " ", " !important; // override :hover styles\n\n      .", " {\n        box-shadow: ", ";\n      }\n    }\n  "])), btnBackground, borderWidth, borderColor, globalClasses.innerShadow, btnShadow);
};
export var buttonSizeMixin = function buttonSizeMixin(fontSize, lineHeight, paddingX, paddingY) {
  return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n    font-size: ", ";\n    box-sizing: border-box;\n    padding: ", ";\n    line-height: ", ";\n  "])), fontSize, getBtnPadding(paddingY, paddingX), lineHeight);
};
export var buttonSizeMixinIE11 = function buttonSizeMixinIE11(paddingX, paddingY) {
  return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n    padding: ", ";\n    line-height: normal;\n  "])), getBtnPadding(paddingY, paddingX));
};