"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _propTypes = _interopRequireDefault(require("prop-types"));

var _core = require("@emotion/core");

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

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; }

function _templateObject() {
  var data = _taggedTemplateLiteral(["\n  display: ", ";\n  margin: ", ";\n  padding: 6px;\n  flex-wrap: nowrap;\n  align-items: center;\n  justify-content: space-between;\n  transition: ", ";\n  font-size: 1em;\n  font-family: \"Rubik\", sans-serif;\n  font-weight: 500;\n  color: ", ";\n  background: ", ";\n  cursor: pointer;\n  border: 2px solid ", ";\n\n  i {\n    margin-right: 12px;\n  }\n\n  span {\n    flex-wrap: nowrap;\n    transition: ", ";\n  }\n\n  &:hover {\n    background-color: ", ";\n    color: ", ";\n  }\n\n  &:focus {\n    outline: none;\n  }\n"]);

  _templateObject = function _templateObject() {
    return data;
  };

  return data;
}

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var buttonClass = function buttonClass(props) {
  return (0, _core.css)(_templateObject(), props.display, props.margin, props.transition, props.accentColor, props.bkgndColor, props.accentColor, props.transition, props.accentColor, props.bkgndColor);
};

var Button = function Button(_ref) {
  var children = _ref.children,
      onClick = _ref.onClick,
      props = _objectWithoutProperties(_ref, ["children", "onClick"]);

  return (0, _core.jsx)("button", {
    type: "button",
    css: buttonClass(props),
    onClick: onClick
  }, children);
};

Button.displayName = "Button";
Button.propTypes = {
  children: _propTypes["default"].string,
  onClick: _propTypes["default"].func,
  display: _propTypes["default"].string,
  margin: _propTypes["default"].string,
  accentColor: _propTypes["default"].string,
  bkgndColor: _propTypes["default"].string,
  transition: _propTypes["default"].string
};
Button.defaultProps = {
  display: "block",
  margin: "12px",
  accentColor: "#1E62BD",
  bkgndColor: "#FFFFFF",
  transition: "all .2s ease-in-out"
};
var _default = Button;
exports["default"] = _default;