"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),o=require("../constants/index.cjs"),u=require("../validators/index.cjs"),d=require("../utils/index.cjs"),n={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:e=>e?Object.values(o.VALIDATION_MESSAGE_TYPES).includes(e):!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&&i.warn("You must provide an aria-label when there is no label passed",this)}}},r={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}}},s={inject:{groupContext:{default:{}},setGroupValue:{default:()=>()=>{}}},data(){return{internalValue:this.value}},computed:{hasGroup(){return Object.prototype.hasOwnProperty.call(this.groupContext,"name")},groupName(){var e;return((e=this.groupContext)==null?void 0:e.name)??""},groupValue(){var e;return(e=this.groupContext)==null?void 0:e.value},groupDisabled(){var e;return((e=this.groupContext)==null?void 0:e.disabled)??!1},groupValidationState(){var e;return((e=this.groupContext)==null?void 0:e.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(){var a;const e=Object.prototype.hasOwnProperty.call(this.groupContext,"name"),t=(a=this.groupContext)==null?void 0:a.name;this.name&&e&&t!==this.name&&i.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)}},l={props:{messagesClass:{type:[String,Array,Object],default:""},messagesChildProps:{type:Object,default:()=>({})},showMessages:{type:Boolean,default:!0},messages:{type:Array,default:()=>[],validator:e=>u.validationMessageValidator(e)}},computed:{formattedMessages(){return d.formatMessages(this.messages)}}},p={InputMixin:n,CheckableMixin:r,GroupableMixin:s,MessagesMixin:l};exports.CheckableMixin=r;exports.GroupableMixin=s;exports.InputMixin=n;exports.MessagesMixin=l;exports.default=p;
//# sourceMappingURL=input.cjs.map
