text: "use strict";
  var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
      if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
      return cooked;
  };
  var __importStar = (this && this.__importStar) || function (mod) {
      if (mod && mod.__esModule) return mod;
      var result = {};
      if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
      result["default"] = mod;
      return result;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var styled_components_1 = __importStar(require("styled-components"));
  var polished_1 = require("polished");
  var Icon_1 = require("../Icon");
  exports.iconMargins = function (props) {
      var spacing = { large: 0, small: 0 };
      switch (props.size) {
          case 'xsmall':
              spacing.small = 2;
              spacing.large = 4;
              break;
          case 'small':
          case 'large':
          default:
              spacing.small = 4;
              spacing.large = 8;
      }
      if (props.iconBefore) {
          return styled_components_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n      margin-left: -", ";\n      margin-right: ", ";\n    "], ["\n      margin-left: -", ";\n      margin-right: ", ";\n    "])), polished_1.rem(spacing.small), polished_1.rem(spacing.large));
      }
      else if (props.iconAfter) {
          return styled_components_1.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n      margin-left: ", ";\n      margin-right: -", ";\n    "], ["\n      margin-left: ", ";\n      margin-right: -", ";\n    "])), polished_1.rem(spacing.large), polished_1.rem(spacing.small));
      }
      else {
          return false;
      }
  };
  exports.ButtonIcon = styled_components_1.default(Icon_1.Icon).withConfig({ displayName: "ButtonIcon", componentId: "sc-ndnkmo" })(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
  exports.buttonIcon = function (props) { return styled_components_1.css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n  ", " {\n    ", ";\n  }\n"], ["\n  ", " {\n    ", ";\n  }\n"])), exports.ButtonIcon, exports.iconMargins(props)); };
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
  //# sourceMappingURL=icon.js.map