import{d,S as i,r as p,i as c,y as f,$ as m,p as y,a0 as v,o as x,h as b,G as g,u as h}from"./app-e2c1adb4.js";import{u as z}from"./use-input-size-6b6f86f1.js";const k=["type"],_=d({__name:"input-text",props:i({type:{default:"text"},size:{default:"lg"},error:{default:""}},{modelValue:{}}),emits:["update:modelValue"],setup(s,{expose:a}){const u=s,t=p(null),r=c(s,"modelValue"),{sizeClass:l}=z(u.size);return f(()=>{m(()=>{var e,o;(e=t.value)!=null&&e.hasAttribute("autofocus")&&((o=t.value)==null||o.focus())})}),a({focus:()=>{var e;return(e=t.value)==null?void 0:e.focus()}}),(e,o)=>y((x(),b("input",{ref_key:"input",ref:t,"onUpdate:modelValue":o[0]||(o[0]=n=>r.value=n),type:e.type,class:g(["w-full rounded-md border-gray-300 placeholder:text-sm placeholder:text-gray-400 focus:border-blue-500 focus:ring-blue-500",[h(l),{"border-red-300 text-red-900 placeholder:text-red-300 focus:border-red-500 focus:ring-red-500":e.error}]])},null,10,k)),[[v,r.value]])}});export{_};
