<script setup>
import { computed } from "vue";
import { useRequiredLabel } from "./useRequiredLabel";
const props = defineProps({
  context: Object
});
const label = useRequiredLabel(props.context);
const value = computed({
  get: () => props.context.value,
  set: (val) => props.context.node.input(val)
});
</script>

<template>
    <q-toggle v-model="value" :label="label" :disable="context.disabled" v-bind="context.attrs">
        <slot></slot>
    </q-toggle>
</template>
