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

<template>
    <q-radio v-model="value" :label="context.label" v-bind="context.attrs" :error="error" :type="context.inputType"
        :error-message="errorMessage">
        <slot></slot>
    </q-radio>
</template>
