<script setup>
import { ref } from 'vue'
import checkSelectImg from './assets/check-select.png'
import checkUnselectImg from './assets/check-unselect.png'

const props = defineProps({
  modelValue: {
    type: Boolean,
    default: false
  }
})

const emit = defineEmits(['update:modelValue'])

const handleClick = () => {
  emit('update:modelValue', !props.modelValue)
}
</script>

<template>
  <div class="checkbox-wrapper">
    <img :src="modelValue ? checkSelectImg : checkUnselectImg" class="checkbox" @click="handleClick"/>
  </div>
</template>

<style scoped lang="less">

.checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;

  .checkbox {
    width: 22rpx;
    height: 22rpx;
  }
}
</style>