import { __assign, __rest } from "tslib";
import React, { useContext } from 'react';
import classNames from 'classnames';
import { ConfigContext } from '../config-provider/config-context';
import { getPrefixCls } from '../_utils/general';
var Skeleton = React.forwardRef(function (props, ref) {
    var _a;
    var _b = props.active, active = _b === void 0 ? false : _b, _c = props.rounded, rounded = _c === void 0 ? false : _c, className = props.className, children = props.children, customisedCls = props.prefixCls, otherProps = __rest(props, ["active", "rounded", "className", "children", "prefixCls"]);
    var configContext = useContext(ConfigContext);
    var prefixCls = getPrefixCls('skeleton', configContext.prefixCls, customisedCls);
    var cls = classNames(prefixCls, className, (_a = {},
        _a[prefixCls + "_active"] = configContext.shimmer || active,
        _a[prefixCls + "_rounded"] = rounded,
        _a));
    return (React.createElement("div", __assign({ ref: ref }, otherProps, { className: cls }), children));
});
Skeleton.displayName = 'Skeleton';
export default Skeleton;
//# sourceMappingURL=index.js.map