import{a as e,n as t,t as n}from"./jsx-runtime-CutOxEx1.js";var r=e(t(),1),i=n();function a({value:e,onChange:t,placeholder:n,autoComplete:a=`current-password`,className:o=`auth-he-input h-11 w-full rounded-2xl text-sm`,disabled:s,onFocus:c,onBlur:l}){let[u,d]=(0,r.useState)(!1);return(0,i.jsxs)(`div`,{className:`relative w-full`,children:[(0,i.jsx)(`input`,{value:e,onChange:e=>t(String(e.target.value||``)),type:u?`text`:`password`,placeholder:n,autoComplete:a,disabled:s,onFocus:c,onBlur:l,className:o,style:{paddingLeft:16,paddingRight:38}}),(0,i.jsx)(`button`,{type:`button`,onClick:()=>d(e=>!e),"aria-label":u?`隐藏密码`:`显示密码`,tabIndex:-1,className:`absolute inset-y-0 right-0 flex items-center justify-center px-2.5`,style:{color:`var(--text-3)`,background:`none`,border:`none`,cursor:`pointer`},children:u?(0,i.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,i.jsx)(`path`,{d:`M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z`}),(0,i.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}):(0,i.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,i.jsx)(`path`,{d:`M9.9 4.24A9.12 9.12 0 0 1 12 4c6.5 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68`}),(0,i.jsx)(`path`,{d:`M6.06 6.06A13.18 13.18 0 0 0 2 11s3.5 7 10 7a9.12 9.12 0 0 0 4.06-.94`}),(0,i.jsx)(`path`,{d:`m1 1 22 22`}),(0,i.jsx)(`path`,{d:`M9.9 9.9a3 3 0 0 0 4.2 4.2`})]})})]})}export{a as t};