<template>
  <div>
    <div class="card">
      <h4 class="card-custom-title">
        {{ $t(i18nConst.governancelastProposalTitle) }}
      </h4>
      <hr>
      <div class="card-body">
        <proposal-item :proposal="lastProposal"></proposal-item>
      </div>
    </div>
  </div>
</template>

<script>
import ProposalItem from "./ProposalItem.vue";
import { mapGetters } from "vuex";
import typeActions from "@/store/typeActions.js";
import i18nConstantes from "@/constantes/i18n.constantes.js";

export default {
  components: {
    ProposalItem,
  },
  data() {
    return {
      i18nConst: i18nConstantes,
    };
  },
  computed: {
    ...mapGetters("proposals", ["lastProposal"]),
  },
  methods: {},
  mounted() {
    this.$store.dispatch(typeActions.initLastProposal);
  },
};
</script>

<style scoped>
.tab-pane {
  padding: 10px;
}

.preview-forms {
  margin-top: 20px;
}

.nav-item {
  margin: 0;
  padding: 0;
}

.nav-item>.nav-link {
  width: 100%;
}

.text-align-end {
  text-align: end;
}
</style>
