<template>
  <div v-if="useMultiLanguage">
    <slot :languages="languages" />
  </div>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator';
import { namespace } from 'vuex-class';
import { SupportedLanguage } from '../../types/language';

const LanguageStore = namespace('languages');

@Component
export default class MultiLanguageOnly extends Vue {
  @LanguageStore.State('useMultiLanguage') useMultiLanguage!: boolean;
  @LanguageStore.State('all') languages!: SupportedLanguage[];
}
</script>
