"use strict";const s=require("react/jsx-runtime"),h=require("react"),g=require("./text-input-BlxK2Naj.cjs.js"),a=require("@commercetools/nimbus-icons"),e=require("./normalize-messages-CaDzkuUm.cjs.js"),n=require("./tooltip-Bv-QlJ1O.cjs.js"),m=require("./icon-button-CeB8_Yyr.cjs.js"),M={hide:"Hide password",show:"Show password"},I={hide:"Passwort ausblenden",show:"Passwort anzeigen"},x={hide:"Ocultar contraseña",show:"Mostrar contraseña"},z={hide:"Masquer le mot de passe",show:"Afficher le mot de passe"},b={hide:"Ocultar senha",show:"Mostrar senha"},f={en:e.normalizeMessages(M),de:e.normalizeMessages(I),es:e.normalizeMessages(x),"fr-FR":e.normalizeMessages(z),"pt-BR":e.normalizeMessages(b)},i=o=>{const{ref:c,size:d="md",isDisabled:l}=o,u=e.useLocalizedStringFormatter(f),[t,p]=h.useState(!1),w=()=>p(!t),r=u.format(t?"hide":"show");return s.jsx(g.TextInput,{ref:c,...o,trailingElement:s.jsxs(n.Tooltip.Root,{children:[s.jsx(m.IconButton,{size:d==="md"?"xs":"2xs",variant:"ghost",colorPalette:"primary","aria-label":r,onPress:w,isDisabled:l,children:t?s.jsx(a.VisibilityOff,{}):s.jsx(a.Visibility,{})}),s.jsx(n.Tooltip.Content,{children:r})]}),type:t?"text":"password"})};i.displayName="PasswordInput";exports.PasswordInput=i;
//# sourceMappingURL=password-input-BVbQ42NG.cjs.js.map
