import{T as m}from"./Label-C2KmBUfM.js";import{T as b}from"./Input-CjMYJgEv.js";import{T as y}from"./InputError-S5X7Xksv.js";import{_ as f,r as o,o as t,c as g,d as n,b as s,n as d}from"./app-PFKfXWEI.js";import{v}from"./v4-C6aID195.js";const _={emits:["update:modelValue"],components:{TecLabel:m,TecInput:b,TecInputError:y},props:{id:{type:String,default(){return v()}},type:{type:String,default:"text"},size:String,label:String,error:String,disabled:Boolean,readonly:Boolean,placeholder:String,modelValue:[String,Number]},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},setSelectionRange(a,l){this.$refs.input.setSelectionRange(a,l)}}};function h(a,l,e,k,S,T){const u=o("tec-label"),i=o("tec-input"),c=o("tec-input-error");return t(),g("div",{class:d(["col-span-6 sm:col-span-4 relative",{"mb-2":e.size!="small"}])},[e.label?(t(),n(u,{key:0,for:e.id,value:e.label},null,8,["for","value"])):s("",!0),e.type=="number"?(t(),n(i,{key:1,id:e.id,ref:"input",step:"0.01",type:e.type,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,class:d(["block w-full",{"border-red-500":e.error,"py-0 pr-0 h-8":e.size=="small","mt-1":e.label}]),placeholder:e.placeholder||e.label,onInput:l[0]||(l[0]=r=>a.$emit("update:modelValue",r.target.value))},null,8,["id","type","disabled","readonly","value","placeholder","class"])):(t(),n(i,{key:2,id:e.id,ref:"input",type:e.type,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,class:d(["block w-full",{"border-red-500":e.error,"py-0 pr-0 h-8":e.size=="small","mt-1":e.label}]),placeholder:e.placeholder||e.label,onInput:l[1]||(l[1]=r=>a.$emit("update:modelValue",r.target.value))},null,8,["id","type","disabled","readonly","value","placeholder","class"])),e.error?(t(),n(c,{key:3,message:e.error,class:"absolute mt-0"},null,8,["message"])):s("",!0)],2)}const x=f(_,[["render",h]]);export{x as T};
