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