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