import { __assign, __rest } from "tslib";
import React, { useContext, useEffect } from 'react';
import classNames from 'classnames';
import { ConfigContext } from '../config-provider/config-context';
import { getPrefixCls } from '../_utils/general';
var LoadingBar = function (props) {
    var didMount = props.didMount, className = props.className, customisedCls = props.prefixCls, otherProps = __rest(props, ["didMount", "className", "prefixCls"]);
    var configContext = useContext(ConfigContext);
    var prefixCls = getPrefixCls('loading-bar', configContext.prefixCls, customisedCls);
    var cls = classNames(prefixCls, className);
    useEffect(function () {
        didMount && didMount();
    }, [didMount]);
    return (React.createElement("div", __assign({}, otherProps, { className: cls }),
        React.createElement("div", { id: "ty-loading-bar", className: prefixCls + "__inner" })));
};
LoadingBar.displayName = 'LoadingBar';
export default LoadingBar;
//# sourceMappingURL=loading-bar.js.map