"use strict";
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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/* @flow */
const React = __importStar(require("react"));
{
    DottedCreateButtonProps;
}
from;
'./types';
const classnames_1 = __importDefault(require("classnames"));
const withStyles_1 = __importDefault(require("components/hoc/withStyles"));
const ErrorBoundary_1 = __importDefault(require("components/hoc/ErrorBoundary"));
const styles_1 = __importDefault(require("./styles"));
class DottedCreateButton extends React.Component {
    _renderButton() {
        const { classes, text, icon, onClick } = this.props;
        const textClasses = classnames_1.default(classes.buttonText);
        return (React.createElement("button", { className: classnames_1.default(classes.button), onClick: onClick },
            icon ? (icon) : (React.createElement("i", { className: classnames_1.default(classes.buttonIcon, 'ion-ios-plus-outline') })),
            React.createElement("div", { className: textClasses }, text)));
    }
    render() {
        let { classes, id } = this.props;
        let componentClass = classnames_1.default(classes.component);
        return (React.createElement(ErrorBoundary_1.default, null,
            React.createElement("div", { className: componentClass, id: id }, this._renderButton())));
    }
}
DottedCreateButton.defaultProps = {
    onClick: () => { },
    id: '',
};
exports.default = withStyles_1.default(styles_1.default)(DottedCreateButton);
//# sourceMappingURL=index.js.map