"use strict";var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard"),_interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits")),_possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")),_getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),React=_interopRequireWildcard(require("react")),_classnames=_interopRequireDefault(require("classnames")),_withStyles=_interopRequireDefault(require("../../hoc/withStyles")),_ErrorBoundary=_interopRequireDefault(require("../../hoc/ErrorBoundary")),_styles=_interopRequireDefault(require("./styles"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=(0,_getPrototypeOf2["default"])(Derived);if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}var DottedCreateButton=/*#__PURE__*/function(_React$Component){function DottedCreateButton(){return(0,_classCallCheck2["default"])(this,DottedCreateButton),_super.apply(this,arguments)}(0,_inherits2["default"])(DottedCreateButton,_React$Component);var _super=_createSuper(DottedCreateButton);return(0,_createClass2["default"])(DottedCreateButton,[{key:"_renderButton",value:function _renderButton(){var _this$props=this.props,classes=_this$props.classes,text=_this$props.text,icon=_this$props.icon,onClick=_this$props.onClick,textClasses=(0,_classnames["default"])(classes.buttonText);return/*#__PURE__*/React.createElement("button",{className:(0,_classnames["default"])(classes.button),onClick:onClick},icon?icon:/*#__PURE__*/React.createElement("i",{className:(0,_classnames["default"])(classes.buttonIcon,"ion-ios-plus-outline")}),/*#__PURE__*/React.createElement("div",{className:textClasses},text))}},{key:"render",value:function render(){var _this$props2=this.props,classes=_this$props2.classes,id=_this$props2.id,componentClass=(0,_classnames["default"])(classes.component);return/*#__PURE__*/React.createElement(_ErrorBoundary["default"],null,/*#__PURE__*/React.createElement("div",{className:componentClass,id:id},this._renderButton()))}}]),DottedCreateButton}(React.Component);(0,_defineProperty2["default"])(DottedCreateButton,"defaultProps",{onClick:function onClick(){},id:""});var _default=(0,_withStyles["default"])(_styles["default"])(DottedCreateButton);exports["default"]=_default;