import{h as e}from"./p-CAus4tQt.js";import{r as t}from"./p-DKrliuRO.js";const a=({id:a,label:s,placeholder:n="",value:o="",onChange:l,onKeyDown:r,autoFocus:p,type:i="text",error:u,maxLength:c,disabled:d,min:m})=>{const b=t.get("theme");return e("div",{class:"mb-2","data-theme":b},s&&e("label",{class:"z-input-label"},s),e("div",{class:"relative"},e("input",{id:a,type:i,placeholder:n,class:`z-input ${c?"pr-16":""} ${d?"bg-paper":""}`,value:o,onInput:e=>{l&&l(e.target.value)},onKeyDown:r,autoFocus:p,maxLength:c,disabled:d,min:m}),c&&e("span",{class:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-gray-400 pointer-events-none"},"(",!!o.length&&o.length,"/",c,")")),!!u&&e("p",{class:"z-input-error"},u))};export{a as Z}