<script>
  import Emitter from 'element-ui-focus/src/mixins/emitter';

  export default {
    name: 'FocusCheckboxGroup',

    componentName: 'FocusCheckboxGroup',

    mixins: [Emitter],

    inject: {
      focusFormItem: {
        default: ''
      }
    },

    props: {
      value: {},
      disabled: Boolean,
      min: Number,
      max: Number,
      size: String,
      fill: String,
      cut: String,
      textColor: String
    },

    computed: {
      _focusFormItemSize() {
        return (this.focusFormItem || {}).focusFormItemSize;
      },
      checkboxGroupSize() {
        return this.size || this._focusFormItemSize || (this.$ELEMENT || {}).size;
      }
    },

    watch: {
      value(value) {
        this.dispatch('FocusFormItem', 'focus.form.change', [value]);
      }
    }
  };
</script>

<template>
  <div class="el-checkbox-group" role="group" aria-label="checkbox-group">
    <slot></slot>
  </div>
</template>
