import{a as r,c as l,b as c,t as s,g as a,w as g,ah as y,e as b,U as f,m as p}from"./vendor-3-7-103.js";const x=["for"],h={key:0,class:"text-red-500"},S=["id","type","placeholder","required","maxlength"],V={key:1,class:"text-xs font-normal text-red-500 mt-2"},k={key:2,class:"text-xs font-normal text-gray-400 mt-2"},N={__name:"TextField",props:{modelValue:{type:[String,Number],required:!0},placeholder:{type:String,default:""},required:{type:Boolean,default:!1},id:{type:[String,Number],default:""},label:{type:String,default:""},type:{type:String,default:"text"},maxlength:{type:[String,Number],default:""},error:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:u}){const n=e,i=u,o=p({get(){return n.modelValue},set(t){i("update:modelValue",t)}});return(t,d)=>(r(),l("label",{for:e.id},[c(s(e.label)+" ",1),e.required?(r(),l("span",h,"*")):a("",!0),g(b("input",{id:e.id,"onUpdate:modelValue":d[0]||(d[0]=m=>o.value=m),step:"0.1",type:e.type,class:"!bg-gray-50 !border !text-gray-900 !text-sm !rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full !p-3 ${error ? '!border-red-500' : '!border-gray-300'}",placeholder:e.placeholder,required:e.required,maxlength:e.maxlength},null,8,S),[[y,o.value]]),e.error?(r(),l("p",V,s(e.error),1)):a("",!0),t.$slots.subtitle?(r(),l("p",k,[f(t.$slots,"subtitle")])):a("",!0)],8,x))}};export{N as _};
