import { __assign, __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import cx from 'classnames';
import { CheckboxGroup } from '../../checkbox';
import { FormField } from '../Field';
function renderCheckboxGroup(childProps, props) {
    return (_jsx(CheckboxGroup, __assign({}, props.props, childProps, { children: props.children }), void 0));
}
var DEFAULT_VALUE = [];
export function FormCheckboxGroupField(props) {
    var className = props.className, rest = __rest(props, ["className"]);
    return (_jsx(FormField, __assign({}, rest, { className: cx(className, 'zent-form-checkbox-group-field'), defaultValue: props.defaultValue ||
            DEFAULT_VALUE }, { children: function (childProps) { return renderCheckboxGroup(childProps, props); } }), void 0));
}
