<script setup lang="ts">
defineProps({
  state: Boolean,
});
</script>
<template>
  <div v-if="state" class="download" :class="{ active: state }">
    <span class="loading"></span>
    {{ $t('COMMON_DOWNNING') }}
  </div>
</template>
<style scoped lang="scss">
.download {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 50%;
  margin-left: -184px;
  top: 50%;
  margin-top: -32px;
  width: 368px;
  height: 64px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: var(--o-border-radius);
  color: var(--o-color-white);
  z-index: 1000;
}
.loading {
  display: inline-block;
  height: 16px;
  width: 16px;
  margin-right: 8px;
  background: url('@/assets/common/image/loading.svg') no-repeat center;
  animation: anim 1s linear infinite;
}
@keyframes anim {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
</style>
