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

<script>
  import Modal from '@/components/Modal';
  import InfogramBlock from '@/components/content-blocks/InfogramBlock';
  import GeniallyBlock from '@/components/content-blocks/GeniallyBlock';

  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>
