<template>
  <div class="lx-checkbox" @click="toggleCheck">
    <img v-if="check" class="check" :src="bgCheck.check">
    <img v-else class="uncheck" :src="bgCheck.uncheck"">
  </div>
</template>

<script>
export default {
  name: 'lxCheckbox',
  props: {
    bgCheck: {
      type: Object,
      default() {
        return {
          check: require('./check.png'),
          uncheck: require('./uncheck.png')
        }
      }
    }
  },
  data() {
    return{
       check: false
    }
  },
  methods: {
    toggleCheck() {
      this.check = !this.check
      this.$emit('check', this.check)
    }
  },
}
</script>
