<template>
  <div class="ipub-loading-page"
       @click.stop
       v-if="loading">
    <div class="tc">
      <div class="ipub-loading-page-icon flex">
        <ipub-icon type="loading" />
      </div>
      <slot>
        <div class="ipub-p1 mar-b-10"
             style="font-size:24px">Loading</div>
        <div class="ipubw-p2"
             style="font-size:20px">Please wait while we set things up for you!</div>
      </slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'IpubLoading',
  props: {
    loading: {
      type: Boolean,
      default: false
    }
  },
}
</script>

<style lang="scss" scoped>
.ipub-loading-page {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background: #e9eef0cc;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  &-icon {
    display: inline-block;
    margin: 0 auto;
    margin-bottom: 70px;
    font-size: 122px;
    // width: 122px;
    // height: 122px;
  }
}
</style>
