'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var formik = require('formik');
var ramda = require('ramda');
var Slider = require('../Slider-jNUS9vt8.js');
require('../primitives/Slider.js');
require('../utils-CTr7wn5d.js');
require('../index-EyWRfsCG.js');
require('../index-COPkC3I5.js');
require('../index-D-iDn9RI.js');
require('../index-CGUGhyIp.js');
require('../index-CyrAgb4H.js');
require('../index-CCdG4z4E.js');
require('../index-BY6wgiQV.js');
require('../index-CF951Pw9.js');
require('../index-Bf0WsHta.js');
require('../index-DMbj7vXd.js');
require('react-dom');
require('../index-Ch55j1or.js');
require('../primitives/Field.js');
require('../index-BZhTddX0.js');
require('../label-Bdc9ytTI.js');
require('../separator-CPy2gyg1.js');

const FormikSlider = React.forwardRef(({ name, onValueChange: onValueChangeProp, onChange: onChangeProp, ...otherProps }, ref) => {
    const [field, meta, { setValue, setTouched }] = formik.useField(name);
    const { status = {}, setStatus } = formik.useFormikContext();
    const fieldStatus = formik.getIn(status, name);
    return (jsxRuntime.jsx(Slider.Slider, { ref: ref, error: meta.error || fieldStatus || "", name: field.name, value: field.value, onBlur: () => setTouched(true), onValueChange: (value) => {
            setStatus(ramda.dissoc(name, status));
            setValue(value);
            onValueChangeProp?.(value);
            onChangeProp?.(value);
        }, ...otherProps }));
});
FormikSlider.displayName = "FormikSlider";

exports.FormikSlider = FormikSlider;
//# sourceMappingURL=Slider.js.map
