import{h as a}from"./p-CAus4tQt.js";import{r as e}from"./p-DKrliuRO.js";const t=({id:t,label:s,placeholder:r="",value:l="",onChange:o,autoFocus:i,rows:u=3,error:n,limit:p})=>{const c=e.get("theme");return a("div",{class:"mb-2","data-theme":c},s&&a("label",{class:"z-input-area-label"},s),a("textarea",{id:t,placeholder:r,class:"z-input-area-input",value:l,onInput:a=>{const e=a.target.value;p&&e.length>p&&(a.target.value=e.slice(0,p)),o?.(a.target.value)},autoFocus:i,rows:u,maxLength:p}),a("div",{class:"flex justify-between"},a("p",{class:"z-input-area-error"},n),a("p",{class:"z-input-area-limit"},p?`${l.length}/${p}`:"")))};export{t as Z}