'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var formik = require('formik');
var ramda = require('ramda');
var Textarea = require('../Textarea-BfdlAJ59.js');
require('../utils-CTr7wn5d.js');
require('../primitives/Field.js');
require('../index-BZhTddX0.js');
require('../label-Bdc9ytTI.js');
require('../index-DMbj7vXd.js');
require('react-dom');
require('../index-D-iDn9RI.js');
require('../separator-CPy2gyg1.js');
require('../primitives/Textarea.js');
require('../textarea-CZSSY75H.js');

const FormikTextarea = React.forwardRef(({ name, onChange: onChangeProp, ...rest }, ref) => (jsxRuntime.jsx(formik.Field, { name: name, children: ({ field, meta, form }) => {
        const { status = {}, setStatus } = form;
        const fieldStatus = formik.getIn(status, name);
        const fieldProps = {
            ...field,
            onChange: (e) => {
                setStatus(ramda.dissoc(name, status));
                field.onChange(e);
                onChangeProp?.(e);
            },
        };
        return (jsxRuntime.jsx(Textarea.Textarea, { ref: ref, error: meta.touched ? meta.error || fieldStatus : "", ...fieldProps, ...rest }));
    } })));
FormikTextarea.displayName = "FormikTextarea";

exports.FormikTextarea = FormikTextarea;
//# sourceMappingURL=Textarea.js.map
