'use strict';

import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import React from 'react';
import PropTypes from 'prop-types';
import Btn from 'react-bootstrap/lib/Button';
import classnames from 'classnames';
export var Button =
/*#__PURE__*/
function (_React$Component) {
  _inheritsLoose(Button, _React$Component);

  function Button() {
    return _React$Component.apply(this, arguments) || this;
  }

  var _proto = Button.prototype;

  _proto.render = function render() {
    var _this$props = this.props,
        withIcon = _this$props.withIcon,
        iconOnly = _this$props.iconOnly,
        className = _this$props.className,
        children = _this$props.children,
        testAutomationId = _this$props.testAutomationId,
        inline = _this$props.inline,
        props = _objectWithoutPropertiesLoose(_this$props, ["withIcon", "iconOnly", "className", "children", "testAutomationId", "inline"]);

    var classNames = classnames(className, {
      'rc-button-icon-only': iconOnly,
      'rc-button-with-icon': withIcon,
      'rc-button-with-inline': inline
    });
    return React.createElement(Btn, _extends({
      "data-test-automation-id": testAutomationId
    }, props, {
      className: classNames
    }), children);
  };

  return Button;
}(React.Component);

_defineProperty(Button, "propTypes", {
  testAutomationId: PropTypes.string,
  withIcon: PropTypes.bool,
  iconOnly: PropTypes.bool,
  children: PropTypes.node,
  className: PropTypes.string,
  inline: PropTypes.bool
});

_defineProperty(Button, "defaultProps", {
  testAutomationId: 'button',
  withIcon: false,
  iconOnly: false,
  children: null,
  className: null,
  inline: false
});