import { __assign, __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import ColorPicker from '../../colorpicker';
import { FormField } from '../Field';
function renderColorPicker(childProps, props) {
    var value = childProps.value, passedProps = __rest(childProps, ["value"]);
    return _jsx(ColorPicker, __assign({}, props.props, passedProps, { color: value }), void 0);
}
export var FormColorPickerField = function (props) {
    return (_jsx(FormField, __assign({}, props, { defaultValue: props.defaultValue || '' }, { children: function (childProps) { return renderColorPicker(childProps, props); } }), void 0));
};
