import React from 'react';
import classnames from 'classnames';
var defaultProps = {
    prefixCls: 'ty-loader',
    size: 'default',
    loading: true,
    tip: null,
    vertical: false,
    blurred: true,
};
var Loader = function (props) {
    var _a, _b, _c;
    var indicator = props.indicator, size = props.size, loading = props.loading, tip = props.tip, vertical = props.vertical, blurred = props.blurred, prefixCls = props.prefixCls, className = props.className, style = props.style, children = props.children;
    var cls = classnames(prefixCls, className, prefixCls + "_" + size, (_a = {},
        _a[prefixCls + "_spinning"] = loading,
        _a));
    var indicatorCls = classnames(prefixCls + "__loader-container", (_b = {},
        _b[prefixCls + "__loader-container_vertical"] = vertical,
        _b));
    var containerCls = classnames(prefixCls + "__container", (_c = {},
        _c[prefixCls + "__container_loading"] = loading,
        _c[prefixCls + "__container_blurred"] = loading && blurred,
        _c));
    return (React.createElement("div", { className: cls, style: style },
        loading && (React.createElement("div", { className: indicatorCls },
            indicator ? indicator : React.createElement("div", { className: prefixCls + "__indicator" }),
            React.createElement("span", { className: prefixCls + "__label" }, tip))),
        children && (React.createElement("div", { className: containerCls }, children))));
};
Loader.defaultProps = defaultProps;
export default Loader;
//# sourceMappingURL=index.js.map