<template>
    <div :class="getClasses()" @click="handleChecked">
    </div>
</template>
<script>
    export default {
        name: 'CheckBox',
        props: ['checked'],
        methods: {
            getClasses() {
                return [
                    'select-checkbox',
                    {
                        [`select-checkbox-indeterminate`]: this.checked
                    }
                ]
            },
            handleChecked() {
                this.$emit('input', !this.checked)
                this.$emit('click', !this.checked)
            }
        }
    }
</script>


