<template>
  <div class="text-danger" v-if="!test"><slot></slot></div>
</template>

<style lang="scss" scoped>
p.text-help:empty {
  display: none;
}
</style>

<script>
import { ValidatorMixin } from './validator-mixin.js';

export default {
  docs: `Toon de inhoud als <code>test</code> <code>false</code> is.`,
  mixins: [ValidatorMixin],
  props: {
    test: {
      type: Boolean,
      required: true,
    },
  },
  created() {
    if (this.validatorEventBus)
      this.validatorEventBus.$emit('validator-created', this);
  },
  beforeDestroy() {
    if (this.validatorEventBus)
      this.validatorEventBus.$emit('validator-removed', this);
  },
};
</script>
