"use strict";

exports.__esModule = true;
exports.default = exports.ButtonText = exports.ButtonIcon = void 0;

var _react = _interopRequireDefault(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _Button = _interopRequireDefault(require("./Button"));

var _Icon = _interopRequireDefault(require("./Icon"));

var _Text = _interopRequireDefault(require("./Text"));

var _excluded = ["icon", "label"];

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

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var ButtonIcon = (0, _styledComponents.default)(_Icon.default).withConfig({
  displayName: "IconButton__ButtonIcon",
  componentId: "sc-xsbiws-0"
})(["font-size:1.23em;margin:-3px -2px;"]);
exports.ButtonIcon = ButtonIcon;

var ButtonText = _styledComponents.default.span.withConfig({
  displayName: "IconButton__ButtonText",
  componentId: "sc-xsbiws-1"
})(["", " + &{margin-left:12px;vertical-align:top;}"], ButtonIcon);

exports.ButtonText = ButtonText;

var IconButton = function IconButton(_ref) {
  var icon = _ref.icon,
      label = _ref.label,
      props = _objectWithoutProperties(_ref, _excluded);

  return /*#__PURE__*/_react.default.createElement(_Button.default, props, icon ? /*#__PURE__*/_react.default.createElement(ButtonIcon, {
    id: icon
  }) : null, label ? /*#__PURE__*/_react.default.createElement(ButtonText, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
    message: label
  })) : null);
};

var _default = IconButton;
var _default2 = _default;
var _default3 = _default2;
exports.default = _default3;
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(ButtonIcon, "ButtonIcon", "/home/vsts/work/1/s/src/components/IconButton.js");
  reactHotLoader.register(ButtonText, "ButtonText", "/home/vsts/work/1/s/src/components/IconButton.js");
  reactHotLoader.register(IconButton, "IconButton", "/home/vsts/work/1/s/src/components/IconButton.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/IconButton.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();

;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(ButtonIcon, "ButtonIcon", "/home/vsts/work/1/s/src/components/IconButton.js");
  reactHotLoader.register(ButtonText, "ButtonText", "/home/vsts/work/1/s/src/components/IconButton.js");
  reactHotLoader.register(IconButton, "IconButton", "/home/vsts/work/1/s/src/components/IconButton.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/IconButton.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();