<script setup>
import { computed } from 'vue'

// variables
const emit = defineEmits(['update:checked'])

const props = defineProps({
  checked: {
    type: [Array, Boolean],
    default: false,
  },
  value: {
    type: String,
    default: null,
  },
})

// computed properties
const proxyChecked = computed({
  get() {
    return props.checked
  },

  set(val) {
    emit('update:checked', val)
  },
})
</script>

<template>
    <input type="checkbox" class="checkbox" :value="value" v-model="proxyChecked">
</template>
