import{_ as n}from"./FlashMessages-DW2Y2mP0.js";import{v as u}from"./v4-SoommWqA.js";import{c as l,o as a,f as o,b as d,t as s,p as c,n as f}from"./app-BhD6J0Va.js";const m={inheritAttrs:!1,props:{id:{type:String,default(){return`text-input-${u()}`}},type:{type:String,default:"text"},error:String,label:String,is_required:{type:Boolean,default:!1},placeholder:String,modelValue:String},emits:["update:modelValue"],methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},setSelectionRange(t,r){this.$refs.input.setSelectionRange(t,r)}}},p=["for"],_=["id","type","placeholder","value"],g={key:1,class:"form-error"};function h(t,r,e,y,S,v){return a(),l("div",{class:f(t.$attrs.class)},[e.label?(a(),l("label",{key:0,class:"form-label",for:e.id},s(e.label)+" "+s(e.is_required?"*":""),9,p)):o("",!0),d("input",c({id:e.id,ref:"input"},{...t.$attrs,class:null},{class:["form-input",{error:e.error}],type:e.type,placeholder:e.placeholder,value:e.modelValue,onInput:r[0]||(r[0]=i=>t.$emit("update:modelValue",i.target.value))}),null,16,_),e.error?(a(),l("div",g,s(e.error),1)):o("",!0)],2)}const B=n(m,[["render",h]]);export{B as T};
