import{T as u}from"./Label-fda955a2.js";import{T as c}from"./InputError-8d3cfe49.js";import{_ as d,r as s,o as a,c as m,g as f,a as g,A as p,d as h,b as _}from"./app-32ed258c.js";import{v as b}from"./v4-4a60fe23.js";const x={emits:["update:modelValue"],components:{TecLabel:u,TecInputError:c},props:{id:{type:String,default(){return b()}},modelValue:String,label:String,error:String},mounted(){this.$nextTick(()=>{this.$refs.input.setAttribute("style",`height: ${this.$refs.input.scrollHeight+2}px`)})},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},autoResizeAndEmit(t){t.target.style.height="auto",t.target.style.height=`${t.target.scrollHeight+2}px`,this.$emit("update:modelValue",t.target.value)}}},y={class:"col-span-6 sm:col-span-4"},T=["id","value"];function V(t,r,e,v,k,o){const i=s("tec-label"),n=s("tec-input-error");return a(),m("div",y,[f(i,{for:e.id,value:e.label},null,8,["for","value"]),g("textarea",p({id:e.id,ref:"input"},t.$attrs,{value:e.modelValue,onInput:r[0]||(r[0]=(...l)=>o.autoResizeAndEmit&&o.autoResizeAndEmit(...l)),class:[{"border-red-500":e.error},"w-full mt-1 border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm"]}),null,16,T),e.error?(a(),h(n,{key:0,message:e.error,class:"mt-0"},null,8,["message"])):_("",!0)])}const $=d(x,[["render",V]]);export{$ as T};
