<template>
  <div class="card mb-2">
    <header class="card-header">
      <h5 class="mb-0">Exporteer timestamps</h5>
    </header>

    <div class="card-body">
      <field label="Timestamps van prijzen downloaden" class="mb-0" no-focus>
        <a class="btn btn-primary" :href="'/api/' + this.urlPart + '/exportPrizes?sweepstakeId=' + this.sweepstakeId" download>Genereer bestand</a>
      </field>
    </div>

    <div class="card-body">
      <field label="Timestamps van deelnames downloaden" class="mb-0" no-focus>
        <a class="btn btn-primary" :href="'/api/' + this.urlPart + '/exportSpins?sweepstakeId=' + this.sweepstakeId" download>Genereer bestand</a>
      </field>
    </div>
  </div>
</template>

<script>
import field from '../shared/form/field.vue';

export default {
  props: {
    sweepstakeId: {
      type: String,
      required: true,
    },
    urlPart: {
      type: String,
      required: true,
    }
  },
  components: {
    field
  }
}
</script>
