<template>
  <label :class="['n-checkbox',disabled?'n-checkbox-disabled':'',border?'n-checkbox-border':'']">
    <input :disabled="disabled" name="contact" type="checkbox" :value="label" :checked="value === label"
           @change="changeVal">
    <span>
      <slot></slot>
    </span>
  </label>
</template>

<script>
export default {
  name: 'bCheckbox',
  props: {
    value: {
      type: [String, Number],
      default: () => ''
    },
    disabled: {
      type: Boolean,
      default: () => false
    },
    border: {
      type: Boolean,
      default: () => false
    },
    label: {
      type: String,
      default: () => ''
    }
  },
  methods: {
    changeVal (event) {
      console.log(event)
    }
  }
}
</script>
