import{T as m}from"./Label-C2KmBUfM.js";import{T as u}from"./InputError-S5X7Xksv.js";import{_ as f,r as s,o as r,c as g,d as a,b as n,v as p,G as b,a as _,f as h,H as v,n as S}from"./app-PFKfXWEI.js";import{v as V}from"./v4-C6aID195.js";const y={emits:["update:modelValue"],components:{TecLabel:m,TecInputError:u},props:{id:{type:String,default(){return V()}},size:String,label:String,error:String,placeholder:String,modelValue:[String,Number,Boolean]},data(){return{selected:this.modelValue}},watch:{selected(t){this.$emit("update:modelValue",t)}},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()}}},k=["id","placeholder"];function B(t,l,e,w,o,z){const c=s("tec-label"),i=s("tec-input-error");return r(),g("div",{class:S(["col-span-6 sm:col-span-4 relative",{"mb-2":e.size!="small"}])},[e.label?(r(),a(c,{key:0,for:e.id,value:e.label},null,8,["for","value"])):n("",!0),p(_("select",v({id:e.id,ref:"input"},t.$attrs,{"onUpdate:modelValue":l[0]||(l[0]=d=>o.selected=d),placeholder:e.placeholder,class:[{"border-red-500":e.error,"py-0 h-8":e.size=="small","mt-1":e.label},"w-full border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm"]}),[h(t.$slots,"default")],16,k),[[b,o.selected]]),e.error?(r(),a(i,{key:1,message:e.error,class:"absolute mt-0"},null,8,["message"])):n("",!0)],2)}const I=f(y,[["render",B]]);export{I as S};
