<script setup lang="ts">
const val = defineModel<boolean>('modelValue', { default: false })
</script>

<template>
	<label class="primary-checkbox">
		<slot name="label" />
		<input v-model="val" type="checkbox">
	</label>
</template>

<style scoped>
.primary-checkbox input {
  appearance: none;
  accent-color: var(--bgl-accent-color);
	height: calc(var(--input-height) / 1.75);
	width: calc(var(--input-height) / 1.75);
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 100%;
  background: var(--bgl-box-bg);
  border: 2px solid var(--bgl-gray);
}

.primary-checkbox {
  height:var(--input-height);
  width:var(--input-height);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--bgl-transition);
  transform: scale(0.8);
}

.primary-checkbox:hover {
  filter: brightness(90%);
}

.primary-checkbox:active {
  filter: brightness(80%);
}

.primary-checkbox input:checked {
  background: var(--bgl-primary);
  box-shadow: inset 0 0 0px 2px white;
}
</style>
