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

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

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

<style scoped>
</style>
