<template>
  <div id="app">
    <AppHeader />
    <AppNavigation v-if="isLoggedIn && user.active" />
    <AppContent />
    <AppFooter />
    <AnswerContact ref="answerContactDialog" />
    <RandomChatDialog ref="randomChatDialog" />
    <CreateFolderDialog ref="createFolderDialog" />
    <EditImageDialog ref="editImageDialog" />
    <UserProfileDialog ref="userProfileDialog" :userId="'0'" />
    <ChooseDialog ref="chooseDialog" />
    <ContactDialog ref="contactDialog" />
    <DataPrivacyDialog ref="dataPrivacyDialog" />
    <ErrorDialog ref="errorDialog" />
    <ImprintDialog ref="imprintDialog" />
    <ShowImageDialog ref="showImageDialog" />
    <MessageDialog ref="messageDialog" />
    <MultiChatDialog ref="multiChatDialog" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex';
import AppHeader from './components/AppHeader.vue';
import AppNavigation from './components/AppNavigation.vue';
import AppContent from './components/AppContent.vue';
import AppFooter from './components/AppFooter.vue';
import AnswerContact from './dialogues/admin/AnswerContact.vue';
import RandomChatDialog from './dialogues/chat/RandomChatDialog.vue';
import CreateFolderDialog from './dialogues/socialnetwork/CreateFolderDialog.vue';
import EditImageDialog from './dialogues/socialnetwork/EditImageDialog.vue';
import UserProfileDialog from './dialogues/socialnetwork/UserProfileDialog.vue';
import ChooseDialog from './dialogues/standard/ChooseDialog.vue';
import ContactDialog from './dialogues/standard/ContactDialog.vue';
import DataPrivacyDialog from './dialogues/standard/DataPrivacyDialog.vue';
import ErrorDialog from './dialogues/standard/ErrorDialog.vue';
import ImprintDialog from './dialogues/standard/ImprintDialog.vue';
import ShowImageDialog from './dialogues/socialnetwork/ShowImageDialog.vue';
import MessageDialog from './dialogues/standard/MessageDialog.vue';
import MultiChatDialog from './dialogues/chat/MultiChatDialog.vue';

export default {
  name: 'App',
  mounted() {
    document.title = 'yourPart';
  },
  computed: {
    ...mapGetters(['isLoggedIn', 'user'])
  },
  components: {
    AppHeader,
    AppNavigation,
    AppContent,
    AppFooter,
    AnswerContact,
    RandomChatDialog,
    CreateFolderDialog,
    EditImageDialog,
    UserProfileDialog,
    ChooseDialog,
    ContactDialog,
    DataPrivacyDialog,
    ErrorDialog,
    ImprintDialog,
    ShowImageDialog,
    MessageDialog,
    MultiChatDialog,
  },
  created() {
    this.$i18n.locale = this.$store.getters.language;
  },
};
</script>

<style>
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
</style>
