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 Divider = function (props) {
    var _a;
    var _b = props.type, type = _b === void 0 ? 'horizontal' : _b, _c = props.dashed, dashed = _c === void 0 ? false : _c, _d = props.align, align = _d === void 0 ? 'center' : _d, customisedCls = props.prefixCls, className = props.className, children = props.children, otherProps = __rest(props, ["type", "dashed", "align", "prefixCls", "className", "children"]);
    var configContext = useContext(ConfigContext);
    var prefixCls = getPrefixCls('divider', configContext.prefixCls, customisedCls);
    var cls = classNames(prefixCls, className, prefixCls + "_" + type, prefixCls + "_" + align, (_a = {},
        _a[prefixCls + "_" + type + "-dashed"] = dashed,
        _a[prefixCls + "_text"] = children,
        _a));
    return (React.createElement("div", __assign({}, otherProps, { className: cls }), children && React.createElement("span", { className: prefixCls + "_inner-text" }, children)));
};
Divider.displayName = 'Divider';
export default Divider;
//# sourceMappingURL=index.js.map