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