<template>
  <component :is="pdfComponent" :pdf="pdf"></component>
</template>
<script>
import { Component, Vue, Prop } from 'vue-property-decorator';

export default
@Component({
})
class PdfViewer extends Vue {
  @Prop() pdf;

  pdfComponent = null;

  async mounted() {
    if (typeof document === 'undefined') {
      return;
    }

    this.pdfComponent = () => import('./PdfViewerSpa');
  }
}
</script>
