import{_ as n}from"./Label-CBaaVbfI.js";import{_ as m}from"./Input-C4-VG2dv.js";import{_ as u}from"./InputError-idDGfizs.js";import{v as i}from"./v4-Ch9TGLTe.js";import{d as c,o as a,e as d,b as r,n as f,c as p,f as g}from"./app-WJL2kJBE.js";const v={class:"col-span-6 sm:col-span-4"},$={__name:"TextInput",props:{id:{type:String,default(){return i()}},type:{type:String,default:"text"},modelValue:String,label:String,error:String},emits:["update:modelValue"],setup(e){const l=c(null);return(o,t)=>(a(),d("div",v,[r(n,{for:e.id,value:e.label},null,8,["for","value"]),r(m,{id:e.id,ref_key:"input",ref:l,type:e.type,value:e.modelValue,class:f(["mt-1 block w-full",{"border-red-500":e.error}]),onInput:t[0]||(t[0]=s=>o.$emit("update:modelValue",s.target.value))},null,8,["id","type","value","class"]),e.error?(a(),p(u,{key:0,message:e.error,class:"mt-1"},null,8,["message"])):g("",!0)]))}};export{$ as _};
