import{r as l,j as e}from"./vendor-react-CGAml-me.js";import{o as m,I as x,B as f,f as u}from"./index-BoGb7ncW.js";import{a2 as p,a3 as d}from"./vendor-icons-JKgav82F.js";function v({value:t,onChange:o,placeholder:r,className:n}){const[a,i]=l.useState(!1),c=m(t);return e.jsxs("div",{className:u("relative flex items-center",n),children:[e.jsx(x,{type:a?"text":"password",value:t,onChange:s=>o(s.target.value),placeholder:r,className:"pr-10 font-mono text-sm",onFocus:s=>{c&&s.target.select()}}),e.jsx(f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 h-full px-3 text-muted-foreground hover:text-foreground",onClick:()=>i(s=>!s),children:a?e.jsx(p,{className:"h-4 w-4"}):e.jsx(d,{className:"h-4 w-4"})})]})}export{v as S};
