<template>
  <div class="vux-checker-box">
    <slot />
  </div>
</template>

<script>
export default {
  props: {
    defaultItemClass: String,
    selectedItemClass: String,
    disabledItemClass: String,
    type: {
      type: String,
      default: 'radio'
    },
    value: [String, Number, Array, Boolean],
    max: Number
  },
  data () {
    return {
      currentValue: this.value
    }
  },
  watch: {
    currentValue (newValue) {
      this.$emit('on-change', newValue)
      this.$emit('input', newValue)
    },
    value (newValue) {
      this.currentValue = newValue
    }
  }
}
</script>
