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 InputGroup = function (props) {
    var _a = props.disabled, disabled = _a === void 0 ? false : _a, _b = props.size, size = _b === void 0 ? 'md' : _b, className = props.className, children = props.children, customisedCls = props.prefixCls, otherProps = __rest(props, ["disabled", "size", "className", "children", "prefixCls"]);
    var configContext = useContext(ConfigContext);
    var prefixCls = getPrefixCls('input-group', configContext.prefixCls, customisedCls);
    var cls = classNames(prefixCls, className);
    var inputSize = props.size || configContext.componentSize || size;
    return (React.createElement("div", __assign({}, otherProps, { className: cls }), React.Children.map(children, function (child) {
        var childProps = {
            disabled: disabled,
            size: inputSize,
        };
        return React.cloneElement(child, childProps);
    })));
};
InputGroup.displayName = 'InputGroup';
export default InputGroup;
//# sourceMappingURL=input-group.js.map