Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../constants/index.cjs`),t=require(`../validators/index.cjs`),n=require(`../utils/index.cjs`);let r=require(`vue`);var i={inheritAttrs:!1,props:{label:{type:String,default:``},name:{type:String,default:``},value:{type:[String,Number,Boolean,Object],default:null},description:{type:String,default:``},disabled:{type:Boolean,default:!1},validationState:{type:String,default:``,validator:t=>t?Object.values(e.VALIDATION_MESSAGE_TYPES).includes(t):!0},inputClass:{type:[String,Array,Object],default:``},labelClass:{type:[String,Array,Object],default:``},descriptionClass:{type:[String,Array,Object],default:``},labelChildProps:{type:Object,default:()=>({})},descriptionChildProps:{type:Object,default:()=>({})},rootClass:{type:[String,Object,Array],default:``}},data(){return{internalDisabled:this.disabled,internalValidationState:this.validationState}},watch:{disabled(e){this.internalDisabled=e},validationState(e){this.internalValidationState=e}},methods:{validateInputLabels(e,t){!e&&!t&&(0,r.warn)(`You must provide an aria-label when there is no label passed`,this)}}},a={props:{modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:null}},data(){return{internalChecked:this.modelValue,internalIndeterminate:this.indeterminate}},watch:{modelValue(e){this.internalChecked=e},indeterminate(e){this.internalIndeterminate=e}}},o={inject:{groupContext:{default:{}},setGroupValue:{default:()=>()=>{}}},data(){return{internalValue:this.value}},computed:{hasGroup(){return Object.prototype.hasOwnProperty.call(this.groupContext,`name`)},groupName(){return this.groupContext?.name??``},groupValue(){return this.groupContext?.value},groupDisabled(){return this.groupContext?.disabled??!1},groupValidationState(){return this.groupContext?.validationState??null},internalName(){return this.name||this.groupName}},watch:{value(e){this.internalValue=e},groupValue:{immediate:!0,handler(e){this.hasGroup&&(this.internalValue=e)}},groupDisabled:{immediate:!0,handler(e){this.hasGroup&&(this.internalDisabled=this.disabled||e)}},groupValidationState:{immediate:!0,handler(e){this.hasGroup&&(this.internalValidationState=e||this.validationState)}}},created(){let e=Object.prototype.hasOwnProperty.call(this.groupContext,`name`),t=this.groupContext?.name;this.name&&e&&t!==this.name&&(0,r.warn)(`Component is being used inside a Group. Did you mean to override the name prop value (${t}) with (${this.name})? It is recommended to only set name at the Group level.`,this)}},s={props:{messagesClass:{type:[String,Array,Object],default:``},messagesChildProps:{type:Object,default:()=>({})},showMessages:{type:Boolean,default:!0},messages:{type:Array,default:()=>[],validator:e=>t.validationMessageValidator(e)}},computed:{formattedMessages(){return n.formatMessages(this.messages)}}},c={InputMixin:i,CheckableMixin:a,GroupableMixin:o,MessagesMixin:s};exports.CheckableMixin=a,exports.GroupableMixin=o,exports.InputMixin=i,exports.MessagesMixin=s,exports.default=c;
//# sourceMappingURL=input.cjs.map