<template>
  <div v-if="loading" class="full center container">
      <div class="loading-bar"></div>
  </div>
</template>

<script>
export default {
  name: "Loading",
  data(){
    return{
      loading: true,
    }
  },
  methods: {
    hide(){
      this.loading = false;
    },
    show(){
      this.loading = true;
    }
  }
}
</script>

<style scoped>
  .full{
    width: 100%;
    height: 100%;
  }
  .center{
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .container{
    position: absolute;
    top: 0;
    background: rgba(23,65,72,0.5)
  }
  .loading-bar{
    width: 300px;height: 300px;background: url("/data/loading.gif") no-repeat center/contain;
    border-radius: 10px;
    /*animation: loading 10ms linear infinite;*/
  }
  @keyframes loading {
    from{
        width: 0;
    }
    to{
      width: 100%;
    }
  }
</style>
