"use strict";
/**
 * @file Spinner
 * @description
 * @author fex
 * @date 2017-11-07
 */
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var theme_1 = require("../theme");
var Spinner = /** @class */ (function (_super) {
    tslib_1.__extends(Spinner, _super);
    function Spinner() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Spinner.prototype.render = function () {
        var _a;
        var _b = this.props, mode = _b.mode, overlay = _b.overlay, spinnerClassName = _b.spinnerClassName, ns = _b.classPrefix, cx = _b.classnames, size = _b.size;
        var spinner = (react_1.default.createElement("div", { className: cx(ns + "Spinner", spinnerClassName, (_a = {},
                _a["Spinner--" + mode] = !!mode,
                _a["Spinner--" + size] = !!size,
                _a)) }));
        if (overlay) {
            return react_1.default.createElement("div", { className: cx("Spinner-overlay") }, spinner);
        }
        return spinner;
    };
    Spinner.defaultProps = {
        overlay: false,
        spinnerClassName: '',
        mode: '',
        size: ''
    };
    return Spinner;
}(react_1.default.Component));
exports.Spinner = Spinner;
exports.default = theme_1.themeable(Spinner);
//# sourceMappingURL=./components/Spinner.js.map
