<script setup>
import { useAuthStore } from '../stores/auth'

const authStore = useAuthStore()
</script>

<template>
  <div class="home">
    <div v-if="!authStore.isAuthenticated">
      <h1>Welcome to {{ project_name }}</h1>
      <p>A Django + Vue.js application</p>
      <div class="actions">
        <router-link to="/register" class="btn btn-primary">Get Started</router-link>
        <router-link to="/login" class="btn btn-secondary">Sign In</router-link>
      </div>
    </div>
    
    <div v-else>
      <h1>Hello, {{ authStore.user?.username }}!</h1>
      <p>You're logged in. Start building something great.</p>
    </div>
  </div>
</template>

<style scoped>
.home {
  text-align: center;
  padding: 3rem 1rem;
}

.home h1 {
  color: #092E20;
  margin-bottom: 0.5rem;
}

.home p {
  color: #666;
  margin-bottom: 1.5rem;
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: #092E20;
  color: white;
}

.btn-primary:hover {
  background: #0a3d2b;
}

.btn-secondary {
  background: white;
  color: #092E20;
  border: 1px solid #092E20;
}

.btn-secondary:hover {
  background: #f5f5f5;
}
</style>
