<template>
  <div class="bx-checkbox-group">
    <slot />
  </div>
</template>
<script>
import { create } from '../utils'
import Emitter from '../mixins/emitter'

export default create({
  name: 'checkbox-group',
  mixins: [Emitter],
  props: {
    value: Array,
    max: {
      type: Number,
      default: 0,
    },
  },

  watch: {
    value(val) {
      this.$emit('change', val)
      this.dispatch('bxs-form-item', 'form.item.reset')
    },
  },
})
</script>
<style>
@import './index.css';
</style>
