<template>
  <div class="vld-parent">
    <loading
      :active="isLoading"
      :can-cancel="false"
      :on-cancel="onCancel"
      :is-full-page="fullPage"
      :color="color"
      :lock-scroll="true"
    />
  </div>
</template>

<script>
import Loading from "vue-loading-overlay";
import "vue-loading-overlay/dist/vue-loading.css";

export default {
  props: {
    isLoading: {
      type: Boolean,
    },
  },
  data() {
    return {
      fullPage: true,
      color: "#F48800",
    };
  },
  components: {
    Loading,
  },
  methods: {
    onCancel() {
      this.$emit("loading", false);
    },
  },
};
</script>
