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

var _Button = require("./Button.styles");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;

var getBtnPadding = function getBtnPadding(paddingY, paddingX) {
  return paddingY + " " + paddingX + " " + paddingY;
};

var buttonUseMixin = exports.buttonUseMixin = function buttonUseMixin(
btnBackground,
btnBackgroundStart,
btnBackgroundEnd,
color,
borderColor,
borderWidth)
{
  var hasGradient = btnBackgroundStart !== btnBackgroundEnd;
  return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\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,



  _Button.globalClasses.arrow,
  color);



};

var buttonHoverMixin = exports.buttonHoverMixin = function buttonHoverMixin(
btnBackground,
btnBackgroundStart,
btnBackgroundEnd,
color,
borderColor,
borderWidth)
{
  var hasGradient = btnBackgroundStart !== btnBackgroundEnd;
  return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\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);

};

var buttonActiveMixin = exports.buttonActiveMixin = function buttonActiveMixin(
btnBackground,
btnShadow,
borderColor,
borderWidth)
{
  return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\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,

  _Button.globalClasses.innerShadow,
  btnShadow);



};

var buttonSizeMixin = exports.buttonSizeMixin = function buttonSizeMixin(fontSize, lineHeight, paddingX, paddingY) {
  return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n    font-size: ", ";\n    box-sizing: border-box;\n    padding: ", ";\n    line-height: ", ";\n  "])),
  fontSize,

  getBtnPadding(paddingY, paddingX),
  lineHeight);

};

var buttonSizeMixinIE11 = exports.buttonSizeMixinIE11 = function buttonSizeMixinIE11(paddingX, paddingY) {
  return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n    padding: ", ";\n    line-height: normal;\n  "])),
  getBtnPadding(paddingY, paddingX));


};