<template>
  <FeatureFlipperModal v-model="isModalOpened">
    <template #additional><slot name="additional"></slot></template>
  </FeatureFlipperModal>
  <FeatureFlipperIndicator @click="openModal" />
</template>

<script lang="ts" setup>
import FeatureFlipperModal from './FeatureFlipperModal.vue';
import konami from '@/services/konami.service';
import { ref } from 'vue';
import FeatureFlipperIndicator from './FeatureFlipperIndicator.vue';

const isModalOpened = ref(false);
const openModal = () => {
  isModalOpened.value = true;
};

// To be able to call featureFlipper() directly in console
(window as any).featureFlipper = openModal;

konami(openModal);
</script>
