import{o as e,c as t,w as a,a2 as i,G as l,i as u}from"./index-DL8B2Mxu.js";import{E as n}from"./emitter.DrjJCwnj.js";import{_ as s}from"./_plugin-vue_export-helper.BCo6x5W8.js";const o=s({name:"u-checkbox-group",emits:["update:modelValue","input","change"],mixins:[n],props:{value:{type:[String,Number,Array,Boolean],default:""},modelValue:{type:[String,Number,Array,Boolean],default:""},max:{type:[Number,String],default:999},disabled:{type:Boolean,default:!1},name:{type:[Boolean,String],default:""},labelDisabled:{type:Boolean,default:!1},shape:{type:String,default:"square"},activeColor:{type:String,default:"#2979ff"},size:{type:[String,Number],default:34},width:{type:String,default:"auto"},wrap:{type:Boolean,default:!1},iconSize:{type:[String,Number],default:20}},data:()=>({values:[],uFromData:{inputAlign:"left"}}),created(){this.children=[]},mounted(){let e=this.$u.$parent.call(this,"u-form");e&&Object.keys(this.uFromData).map((t=>{this.uFromData[t]=e[t]}))},methods:{emitEvent(e){let t=this.values||[];if(e.value){-1===t.indexOf(e.name)&&t.push(e.name)}else{let a=t.indexOf(e.name);a>-1&&t.splice(a,1)}this.$emit("change",t),this.$emit("input",t),this.$emit("update:modelValue",t),setTimeout((()=>{this.dispatch("u-form-item","onFieldChange",t)}),60)},_emitEvent(e){let t=this.values||[];if(e.value){-1===t.indexOf(e.name)&&t.push(e.name)}else{let a=t.indexOf(e.name);a>-1&&t.splice(a,1)}}}},[["render",function(n,s,o,r,m,d){const p=u;return e(),t(p,{class:l(["u-checkbox-group u-clearfix","right"==m.uFromData.inputAlign?"flex-end":""])},{default:a((()=>[i(n.$slots,"default",{},void 0,!0)])),_:3},8,["class"])}],["__scopeId","data-v-f5f3c6df"]]);export{o as _};
