<template>
  <q-field v-bind="$props" :outlined="outlinedOverride" :borderless="borderlessOverride">
    <template v-for="(_, slot) of $slots" #[slot]="scope">
      <slot :name="slot" v-bind="{...scope}" />
    </template>
  </q-field>
</template>
<script>
import { QField } from "quasar";
import FieldMixin from "../../../mixins/field";

export default {
  name: "WField",
  mixins: [QField, FieldMixin],
  inheritAttrs: true,
  computed: {
    outlinedOverride() {
      return this.outlined && this.$slots.control === undefined;
    },
    borderlessOverride() {
      return this.borderless || this.$slots.control !== undefined;
    }
  }
};
</script>
