<template>
  <div v-if="isModalVisible" class="loading-modal-backdrop">
    <div class="loading-modal">
      <section class="loading-modal-body">
        <div class="modal-icon-container text-center">
            <img alt="Loading" src="@/assets/img/FMGTransitionAnimation.svg">
        </div>
       </section>
    </div>
   </div>
</template>

<script>
  export default {
    name: 'Modal',
    data() {
      return {
        isModalVisible: false,
      };
    },
    methods: {
      showModal() {
        this.isModalVisible = true;
      },
    },
  };
</script>

<style lang="scss">
  .loading-modal-backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #e5e5e5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
  }

  .loading-modal {
    position: absolute;
    background: #ffffff;
    padding: 0 0 32px 0;
    box-shadow: 2px 2px 20px 1px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    top: 48px;
    height: 186px;
    width: 327px;
  }

  .loading-modal-text {
      padding: 0 24px 0 24px;
  }

  .modal-icon-container {
    margin: 15px auto;
    padding-bottom: 26px;
  }

  .modal-icon-container img {
      position: absolute;
      vertical-align: middle;
      border: 0;
      width: 327px;
      height: 186px;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
  }

  .loader-gif {
      width: 75px;
      height: 75px;
  }
</style>