"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),i=require("../validators/index.cjs"),t=require("../utils/index.cjs"),r=require("../../lib/validation-messages/validation-messages.cjs"),a={components:{DtValidationMessages:r.default},provide(){return{groupContext:this.provideObj,setGroupValue:this.setGroupValue}},props:{id:{type:String,default(){return t.getUniqueString()}},value:{type:[String,Number,Boolean,Object],default:null},name:{type:String,required:!0},legend:{type:String,default:""},disabled:{type:Boolean,default:!1},messages:{type:Array,default:()=>[],validator:e=>i.validationMessageValidator(e)},showMessages:{type:Boolean,default:!0},legendClass:{type:[String,Array,Object],default:""},messagesClass:{type:[String,Array,Object],default:""},legendChildProps:{type:Object,default:()=>({})},messagesChildProps:{type:Object,default:()=>({})}},emits:["input"],data(){const e=t.formatMessages(this.messages);return{provideObj:{name:this.name,disabled:this.disabled,validationState:t.getValidationState(e)}}},computed:{formattedMessages(){return t.formatMessages(this.messages)},validationState(){return t.getValidationState(this.formattedMessages)}},watch:{disabled(e){this.provideObj.disabled=e},validationState(e){this.provideObj.validationState=e}},methods:{setGroupValue(e){this.internalValue=e,this.$emit("input",e)}},mounted(){!this.legend&&!this.$slots.legend&&!this.$attrs["aria-label"]&&s.warn("It is expected that an aria-label is provided when there is no legend.",this)}},d={InputGroupMixin:a};exports.InputGroupMixin=a;exports.default=d;
//# sourceMappingURL=input-group.cjs.map
