import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { useField, useFormikContext, getIn } from 'formik';
import { dissoc } from 'ramda';
import { S as Slider } from '../Slider-BCQXhs0Q.js';
import '../primitives/Slider.js';
import '../utils-DdHUxIdC.js';
import '../index-BfAAoDv6.js';
import '../index-DNzunGHb.js';
import '../index-BtkPdosV.js';
import '../index-CiyxEyB0.js';
import '../index-Cor698lu.js';
import '../index-DOzu5J1s.js';
import '../index-d0BBQf5t.js';
import '../index-30QpKM0j.js';
import '../index-BYZaLNq1.js';
import '../index-DhnfW8wQ.js';
import 'react-dom';
import '../index-Dd1i1d2M.js';
import '../primitives/Field.js';
import '../index-D7Zy7P05.js';
import '../label-B4qDF3W1.js';
import '../separator-BbhgePmX.js';

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

export { FormikSlider };
//# sourceMappingURL=Slider.js.map
