<template>
  <div v-if="showProgress" class="progress">
    <div class="progress-bar">
      <el-progress type="circle" :percentage="percentage" />
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
  computed: {
    ...mapGetters(['showProgress', 'percentage'])
  }
};
</script>

<style lang="scss" scoped>
.progress {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3001;
  background-color: hsla(0, 0%, 100%, 0.9);
  transition: opacity 0.3s;

  &-bar {
    position: absolute;
    top: 50%;
    width: 100%;
    margin-top: -65px;
    text-align: center;
  }
}
</style>
