<template>
  <div>
    <q-toggle
      v-model="value"
      left-label
      color="orange"
      :label="label"
      class="col col-12"
    />
  </div>
</template>

<script setup>
import { ref, useAttrs, onMounted } from 'vue';
import { QToggle } from 'quasar'

const attrs = useAttrs();
let value = ref(attrs.default);
const label = ref();

onMounted(() => {
  if (attrs.description != '' && attrs.description != undefined) {
    label.value = attrs.description;
  } else {
    label.value = 'Sin título';
  }
});
</script>
