mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			502 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			502 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <div v-if="isFeatureEnabled">
 | 
						|
    <slot />
 | 
						|
  </div>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import { mapGetters } from 'vuex';
 | 
						|
export default {
 | 
						|
  props: {
 | 
						|
    featureKey: {
 | 
						|
      type: String,
 | 
						|
      required: true,
 | 
						|
    },
 | 
						|
  },
 | 
						|
  computed: {
 | 
						|
    ...mapGetters({
 | 
						|
      isFeatureEnabledonAccount: 'accounts/isFeatureEnabledonAccount',
 | 
						|
      accountId: 'getCurrentAccountId',
 | 
						|
    }),
 | 
						|
    isFeatureEnabled() {
 | 
						|
      return this.isFeatureEnabledonAccount(this.accountId, this.featureKey);
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
</script>
 |