<template>
  <v-app>
    <NavBar />
    <v-main class="tw-bg-neutrals-100">
      <Nuxt keep-alive :keep-alive-props="{ include: includeArr }" />
      <!-- <Nuxt /> -->
    </v-main>
    <Footer />
    <customNotifications></customNotifications>
    <!-- <customMessenger></customMessenger> -->
  </v-app>
</template>
<!-- will be converted into something like this -->
<!-- <div>
  <KeepAlive :include="includeArr">
    <RouterView />
  </KeepAlive>
</div> -->

<script>
import NavBar from "../components/NavBar.vue";
import Footer from "../components/Footer.vue";
import customNotifications from "@/components/newComponent/notifications/notifications.vue";
// import customMessenger from "@/components/fb-messenger/customMessenger.vue";
export default {
  name: "service",
  components: {
    Footer,
    NavBar,
    customNotifications,
    // customMessenger,
  },
  data() {
    return {
      includeArr: ['checkout','done']
    };
  },
  computed: {
    drawerAcitve() {
      return this.$store.getters.getDrawerStatus;
    },
    searchDialogActive() {
      return this.$store.getters.getSearchDialogStatus;
    }
  },
  watch: {
    drawerAcitve: {
      handler: function () {
        this.bsd(this.drawerAcitve);
      }
    },
    searchDialogActive: {
      handler: function () {
        this.bsd(this.searchDialogActive);
      }
    }
  },
  methods: {
    bsd(status) {
      var body = document.querySelector("body");
      var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
      var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
      window.onscroll = function () { };
      if (status === true) {
        if (window.onscroll !== null) {
          window.onscroll = function () {
            window.scrollTo(scrollLeft, scrollTop);
          };
        }
      } else {
        window.onscroll = function () { };
      }
    }
  }
};
</script>

<style lang="scss" scoped>

</style>