<template>
    <div class="home-logged-in">
        <h1>Willkommen zurück!</h1>
        <p>Schön, dass du wieder da bist.</p>
        
        <TermineWidget />
        
        <div class="actions">
            <button @click="handleLogout" class="logout-btn">Logout</button>
        </div>
    </div>
</template>

<script>
import { mapActions } from 'vuex';
import TermineWidget from '@/components/TermineWidget.vue';

export default {
    name: 'HomeLoggedInView',
    components: {
        TermineWidget
    },
    methods: {
        ...mapActions(['logout']),
        handleLogout() {
            this.logout();
        }
    }
};
</script>

<style scoped>
.home-logged-in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.home-logged-in h1 {
    color: #333;
    margin-bottom: 10px;
}

.home-logged-in p {
    color: #666;
    margin-bottom: 20px;
}

.actions {
    margin-top: 30px;
    text-align: center;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.logout-btn:hover {
    background: #c82333;
}
</style>