import{o as t,c as r,h as c,t as d,b as m,w as y,aI as g,a as f,r as x,d as b}from"./vendor-3-7-97.js";const p=["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:n}){const s=e,u=n,l=b({get(){return s.modelValue},set(a){u("update:modelValue",a)}});return(a,o)=>(t(),r("label",{for:e.id},[c(d(e.label)+" ",1),e.required?(t(),r("span",h,"*")):m("",!0),y(f("input",{id:e.id,"onUpdate:modelValue":o[0]||(o[0]=i=>l.value=i),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),[[g,l.value]]),e.error?(t(),r("p",V,d(e.error),1)):(t(),r("p",k,[x(a.$slots,"subtitle")]))],8,p))}};export{N as _};
