<template>
   <div>
        <survey v-if="survey"  :survey="survey"></survey>
   </div>
</template>

<script>
export default {
  name: 'preview',
  props: {
    surveyData: {
      default () {
        return {}
      }
    }
  },
  computed: {
  },
  mounted () {
    this.$nextTick(() => {
      const triggers = this.surveyData.triggers || []
      const pages = this.surveyData.pages || []
      this.survey = new this._survey.Model({ pages, triggers })
    })
  },
  components: {

  },
  data () {
    return {
      survey: null
    }
  },
  methods: {

  }
}
</script>

<style scoped>

</style>
