import { jsxs as u, jsx as e } from "react/jsx-runtime";
import { M as I } from "./money-input-D65vrUj4.es.js";
import { F as r } from "./form-field-BfDU18h3.es.js";
import { F as M } from "./field-errors-D1BQvoYg.es.js";
const x = ({
  id: l,
  label: t,
  description: s,
  info: n,
  errors: o,
  renderError: d,
  touched: m = !1,
  isRequired: p = !1,
  isDisabled: c = !1,
  isReadOnly: f = !1,
  isInvalid: h = !1,
  size: a = "md",
  ...F
}) => {
  const i = m && o && Object.values(o).some(Boolean);
  return /* @__PURE__ */ u(
    r.Root,
    {
      id: l,
      size: a,
      isInvalid: i || h,
      isRequired: p,
      isDisabled: c,
      isReadOnly: f,
      children: [
        /* @__PURE__ */ e(r.Label, { children: t }),
        /* @__PURE__ */ e(r.Input, { children: /* @__PURE__ */ e(I, { size: a, ...F }) }),
        s && /* @__PURE__ */ e(r.Description, { children: s }),
        n && /* @__PURE__ */ e(r.InfoBox, { children: n }),
        i && /* @__PURE__ */ e(r.Error, { children: /* @__PURE__ */ e(
          M,
          {
            id: `${l}-errors`,
            errors: o,
            renderError: d
          }
        ) })
      ]
    }
  );
};
x.displayName = "MoneyInputField";
export {
  x as M
};
//# sourceMappingURL=money-input-field-CSnaaDk-.es.js.map
