<template>
  <div id="orders">
    <v-runtime-template
      type="orders"
      :template="ordersTemplate"
      :settings="[]"
      :data="{ theme }" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import VRuntimeTemplate from '@/components/sale-page/VRuntimeTemplate.vue'

export default {
  components: {
    VRuntimeTemplate
  },
  data () {
    return {
      headerTemplate: '',
      ordersTemplate: '',
      footerTemplate: ''
    }
  },
  computed: {
    ...mapGetters({
      theme: 'salePage/theme'
    })
  },
  async created () {
    this.ordersTemplate = await fetch(`/html/${this.$route.params.slug}/orders.html`).then((r) => r.text())
  }
}
</script>

<style scoped>
</style>
