<template>
  <div id="app">
    <dashboard-core-app-bar />
  </div>
</template>
<script>
  export default {
    data() {
      return {
        darkMode: false,
      }
    },
    components: {
      DashboardCoreAppBar: () => import('./components/AppBar'),
      DashboardCoreDrawer: () => import('./components/Drawer'),
      DashboardCoreSettings: () => import('./components/Settings'),
      DashboardCoreView: () => import('./components/View'),
    },
    created () {
      //  [App.vue specific] When App.vue is first loaded start the progress bar
      this.$Progress.start()
      //  hook the progress bar to start before we move router-view
      this.$router.beforeEach((to, from, next) => {
        //  does the page we want to go to have a meta.progress object
        if (to.meta.progress !== undefined) {
          let meta = to.meta.progress
          // parse meta tags
          this.$Progress.parseMeta(meta)
        }
        //  start the progress bar
        this.$Progress.start()
        //  continue to next page
        next()
      })
    }
  }
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
