<script setup lang="ts">
defineProps<{
  modelValue?: boolean
  'onUpdate:modelValue'?: (value: boolean) => void
  ariaLabel?: string
  disabled?: boolean
  checked?: boolean
}>()
</script>

<template>
  <input
    type="checkbox"
    :checked="modelValue || checked"
    :disabled="disabled"
    :aria-label="ariaLabel"
    @change="(e) => $emit('update:modelValue', (e.target as HTMLInputElement).checked)"
    class="h-4 w-4 rounded border-gray-300"
  />
</template>