<template>
  <div class="row p-2" @click="checkItem">
    <div class="custom-control custom-checkbox">
      <input type="checkbox" class="custom-control-input" :checked="checked" />
      <label class="custom-control-label">{{title}}</label>
    </div>
  </div>
</template>

<script>
export default {
  props: ['title'],
  data() {
    return {
      checked: true,
    };
  },
  methods: {
    checkItem() {
      this.checked = !this.checked;
      this.$emit('checkItem', this.title, this.checked);
    },
  },
};
</script>
