<template>
  <div id="app">
    <Navbar></Navbar>
    <router-view />
    <vueTopprogress ref="topProgress" color="#ed022c" errorColor="#ffbc34" />
  </div>
</template>
<style src="@/assets/css/colors/default-dark.css"></style>
<style src="@/assets/css/style.css"></style>
<script>
import Navbar from "@/components/shared/Navbar.vue";
import { vueTopprogress } from "vue-top-progress";
export default {
  data() {
    return {
    
    }
  },
  name: "App",
  components: {
    Navbar
  },
  created() {
    this.$router.beforeResolve((to, from, next) => {
      if (to.name) {
        this.$refs.topProgress.start();
      }
      next();
    });
    this.$router.afterEach((to, from) => {
      // colocar un retardo para leer;
      setTimeout(() => {
        this.$refs.topProgress.done();
      }, 100);
    });
  }
};
</script>
 
