<template>
  <modal :fullscreen="true">
    <component
      :value="value"
      :is="type"
    />
  </modal>
</template>

<script>
import Modal from '@/components/Modal.vue';
import { defineAsyncComponent } from 'vue';
const InfogramBlock = defineAsyncComponent(() =>
  import('@/components/content-blocks/InfogramBlock.vue')
);
const GeniallyBlock = defineAsyncComponent(() =>
  import('@/components/content-blocks/GeniallyBlock.vue')
);

export default {
  components: {
    Modal,
    InfogramBlock,
    GeniallyBlock,
  },

  computed: {
    id() {
      return this.$store.state.infographic.id;
    },
    type() {
      return this.$store.state.infographic.type;
    },
    value() {
      return {
        id: this.id,
      };
    },
  },
};
</script>
