<template>
	<w-app :class="appClass" class="shade-1--bg">
		<AppMaintenance v-if="hasMaintenance" />
		
		<template v-else>
			<AppToolbar ref="toolbar" />
			<Nuxt />
			<TaskViewer />
			<AppCreationDialogs />
		</template>
	</w-app>
</template>

<script lang="ts">
import Vue from 'vue';
import { mapGetters } from 'vuex';

export default Vue.extend({
	computed: {
		...mapGetters(['appClass']),

		hasMaintenance(): boolean {
			return this.$store.state.config.maintenance && this.$store.state.profile?.role != 'admin';
		}
	}
});
</script>