import { __assign, __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import cn from 'classnames';
import { FormField } from '../Field';
import { SingleUpload, } from '../../upload';
function renderSingleUpload(childProps, props) {
    var value = childProps.value, onChange = childProps.onChange;
    return (_jsx(SingleUpload, __assign({}, props.props, { value: value, onChange: onChange }), void 0));
}
export function FormSingleUploadField(props) {
    var _a;
    var className = props.className, rest = __rest(props, ["className"]);
    return (_jsx(FormField, __assign({}, rest, { className: cn(className, 'zent-form-single-upload-field'), defaultValue: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : null }, { children: function (childProps) { return renderSingleUpload(childProps, props); } }), void 0));
}
