"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 = this.props, mode = _a.mode, overlay = _a.overlay, spinnerClassName = _a.spinnerClassName, ns = _a.classPrefix, cx = _a.classnames, size = _a.size;
        var spinner = (react_1.default.createElement("div", { className: cx(ns + "Spinner", spinnerClassName, (_b = {},
                _b["Spinner--" + mode] = !!mode,
                _b["Spinner--" + size] = !!size,
                _b)) }));
        if (overlay) {
            return react_1.default.createElement("div", { className: cx("Spinner-overlay") }, spinner);
        }
        return spinner;
        var _b;
    };
    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
