<template>
  <div class="admin" v-if="$auth.loggedIn && $auth.user.scope.includes('admin')">
    <!--					<div class="admin">-->
    <div class="admin">
      <admin-header/>
      <div class="container-fluid">
        <div class="row">
          <aside class="admin--sidebar">
            <div class="sidebar--content">
              <admin-user v-if="$auth.loggedIn && $auth.user.scope.includes('admin')" :user="$auth.user.name"/>
              <admin-aside/>
            </div>
          </aside>
          <div class="admin--content">
            <nuxt/>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="admin" v-else>
    <div class="admin--content" style="flex-basis: 100%!important;height: 100%!important;">
      <div class="container">
        <div class="row">
          <nuxt/>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  head() {
    return {
      htmlAttrs: {
        lang: 'fa'
      }
    }
  },
  middleware: 'auth-admin'
}
</script>

<style lang="scss">
@import "assets/admin/sass/admin";
</style>
