'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var formik = require('formik');
var ramda = require('ramda');
var Input = require('../Input-lWo0YoZ9.js');
require('../utils-BhM0B89p.js');
require('../primitives/Field.js');
require('../HelpIcon-QpZY6Zmc.js');
require('../primitives/Tooltip.js');
require('../tooltip-hM8gc5L8.js');
require('../index-COPkC3I5.js');
require('../index-D-iDn9RI.js');
require('../index-CGUGhyIp.js');
require('../index-Bvu9MiFi.js');
require('../index-DMbj7vXd.js');
require('react-dom');
require('../index-lWVw05cs.js');
require('../index-BwAq9ba8.js');
require('../index-CCdG4z4E.js');
require('../index-owSUsE-n.js');
require('../floating-ui.react-dom--alWUjS1.js');
require('../floating-ui.utils.dom-BGEmL7pd.js');
require('../index-Bf0WsHta.js');
require('../index-Df-Ffa3s.js');
require('../index-DcCSSgb7.js');
require('../index-CyrAgb4H.js');
require('../index-CB9xFokC.js');
require('../renderIcon-BRrpZu9a.js');
require('../createLucideIcon-D0tRgV6l.js');
require('../Popover-5BUgIW60.js');
require('../index-vioSzJOw.js');
require('../primitives/HoverCard.js');
require('../Typography-BW6xEk10.js');
require('../index-DuNgWCXZ.js');
require('../Button-DJSysuyG.js');
require('react-router-dom');
require('../primitives/Button.js');
require('../button-CSBhDSDJ.js');
require('../primitives/Spinner.js');
require('react-i18next');
require('../loader-circle-Bw7zP2Gn.js');
require('../label-BdcX4_ud.js');
require('../separator-DSL-aG1J.js');
require('../primitives/InputGroup.js');
require('../input-group-DZ-c2jRZ.js');
require('../input-BVxqXG2C.js');
require('../textarea-Cq6pBK7q.js');
require('../withIconSize-C6LP0R7o.js');

const FormikInput = React.forwardRef(
  ({ name, onChange: onChangeProp, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(formik.Field, { 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 /* @__PURE__ */ jsxRuntime.jsx(
      Input.Input,
      {
        ref,
        ...fieldProps,
        error: meta.touched ? meta.error || fieldStatus : "",
        ...rest
      }
    );
  } })
);
FormikInput.displayName = "FormikInput";

exports.FormikInput = FormikInput;
//# sourceMappingURL=Input.js.map
