"use strict";
/* @flow */
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 });
const React = __importStar(require("react"));
{
    CircularProgressBarProps;
}
from;
'./types';
const prop_types_1 = __importDefault(require("prop-types"));
const rc_progress_1 = require("rc-progress");
const withStyles_1 = __importDefault(require("components/hoc/withStyles"));
const ErrorBoundary_1 = __importDefault(require("components/hoc/ErrorBoundary"));
const styles_1 = __importDefault(require("./styles"));
class CircularProgressBar extends React.Component {
    render() {
        const { classes, value, filledColor, unfilledColor, strokeWidth, lineShape, children, } = this.props;
        return (React.createElement(ErrorBoundary_1.default, null,
            React.createElement("div", { className: classes.component },
                React.createElement(rc_progress_1.Circle, { strokeWidth: strokeWidth, strokeColor: filledColor, trailColor: unfilledColor, trailWidth: strokeWidth, strokeLinecap: lineShape, percent: value }),
                children && React.createElement("div", { className: classes.children }, children))));
    }
}
CircularProgressBar.propTypes = {
    filledColor: prop_types_1.default.string,
    unfilledColor: prop_types_1.default.string,
    value: prop_types_1.default.number,
    width: prop_types_1.default.number,
    strokeWidth: prop_types_1.default.number,
    lineShape: prop_types_1.default.oneOf(['square', 'round', 'butt']),
    children: prop_types_1.default.node,
    classes: prop_types_1.default.object,
};
CircularProgressBar.defaultProps = {
    unfilledColor: '#DEDEDE',
    filledColor: '#f4a22a',
    width: 150,
    strokeWidth: 10,
    lineShape: 'square',
};
exports.default = withStyles_1.default(styles_1.default)(CircularProgressBar);
//# sourceMappingURL=index.js.map