"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getHoverBackgroundColor = exports.getMinWidth = exports.getBorderRadius = exports.getHeight = void 0;

var _color = _interopRequireDefault(require("color"));

var _branding = require("../../../mixins/branding");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var getHeight = function getHeight(_ref) {
  var _ref$size = _ref.size,
      size = _ref$size === void 0 ? 'md' : _ref$size;

  switch (size) {
    case 'sm':
      return '40px';

    case 'md':
      return '48px';

    default:
      return '48px';
  }
};

exports.getHeight = getHeight;

var getBorderRadius = function getBorderRadius(_ref2) {
  var theme = _ref2.theme;
  return theme.buttonBorderRadius;
};

exports.getBorderRadius = getBorderRadius;

var getMinWidth = function getMinWidth(_ref3) {
  var shrink = _ref3.shrink;
  return shrink == null ? '160px' : undefined;
};

exports.getMinWidth = getMinWidth;

var getHoverBackgroundColor = function getHoverBackgroundColor(props) {
  return (0, _color["default"])((0, _branding.getPaletteColor)('brand-primary-fg')(props)).darken(0.2);
};

exports.getHoverBackgroundColor = getHoverBackgroundColor;