import { jsx as s, jsxs as c } from "react/jsx-runtime";
import { useState as w } from "react";
import { T as h } from "./text-input-CCiZeQad.es.js";
import { VisibilityOff as u, Visibility as f } from "@commercetools/nimbus-icons";
import { n as e, u as g } from "./normalize-messages-D5T4I93D.es.js";
import { T as a } from "./tooltip-D3QrrizN.es.js";
import { I } from "./icon-button-CosIm3oY.es.js";
const M = { hide: "Hide password", show: "Show password" }, P = { hide: "Passwort ausblenden", show: "Passwort anzeigen" }, b = { hide: "Ocultar contraseña", show: "Mostrar contraseña" }, x = {
  hide: "Masquer le mot de passe",
  show: "Afficher le mot de passe"
}, y = { hide: "Ocultar senha", show: "Mostrar senha" }, z = {
  en: /* @__PURE__ */ e(M),
  de: /* @__PURE__ */ e(P),
  es: /* @__PURE__ */ e(b),
  "fr-FR": /* @__PURE__ */ e(x),
  "pt-BR": /* @__PURE__ */ e(y)
}, S = (t) => {
  const { ref: n, size: i = "md", isDisabled: d } = t, p = g(z), [o, l] = w(!1), m = () => l(!o), r = p.format(o ? "hide" : "show");
  return /* @__PURE__ */ s(
    h,
    {
      ref: n,
      ...t,
      trailingElement: /* @__PURE__ */ c(a.Root, { children: [
        /* @__PURE__ */ s(
          I,
          {
            size: i === "md" ? "xs" : "2xs",
            variant: "ghost",
            colorPalette: "primary",
            "aria-label": r,
            onPress: m,
            isDisabled: d,
            children: o ? /* @__PURE__ */ s(u, {}) : /* @__PURE__ */ s(f, {})
          }
        ),
        /* @__PURE__ */ s(a.Content, { children: r })
      ] }),
      type: o ? "text" : "password"
    }
  );
};
S.displayName = "PasswordInput";
export {
  S as P
};
//# sourceMappingURL=password-input-8bkpGOIX.es.js.map
