<template>
  <div class="card">
    <h4 class="card-custom-title">
      <!-- {{ $t(i18nConst.lotteryBuyTicketsTitle) }} -->
      {{ $t(i18nConst.lotteryBuyTicketsPool) }}
    </h4>
    <hr>
    <div class="row p-card mb-3">
      <div class="col-5 p-card d-flex align-items-center">
        <img src="@/assets/logo_blackback.png" class="img-fluid" style="height:70%" />
      </div>
      <div class="col-7 d-flex align-items-center">
        <div class="">
          <!-- <div class="row"><h4>Metadex</h4></div> -->
          <div class="row"><h5><b>{{ utils.formatDisplayAmountMetadex(poolPrize) }} METADEXDAO</b></h5></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import web3Utils from "@/utils/web3.utils.js";
import i18nConstantes from "@/constantes/i18n.constantes.js";
import constantes from "@/constantes/constantes.js";

export default {
  name: "PoolPrize",
  data() {
    return {
      i18nConst: i18nConstantes,
      constantes: constantes,
      utils: web3Utils
    };
  },
  computed: {
    ...mapGetters("lottery", [
      "infosLottery"
    ]),
    ...mapGetters("global", [
      "web3"
    ]),
    poolPrize() {
      if (this.infosLottery) {
        if (this.web3) {
          //return this.web3.utils.fromWei(this.infosLottery.amountCollectedInMetadex, "ether")
          return this.infosLottery.amountCollectedInMetadex / 1000000;
        } else {
          return 0;
        }
      } else {
        return 0;
      }
    }
  }
}
</script>

<style lang="scss" scoped>

</style>