<script setup lang="ts">
import { computed } from 'vue'
import { RouterLink } from 'vue-router'

import { useAuthStore } from '@/stores/auth'

const authStore = useAuthStore()
const isAuthenticated = computed(() => authStore.isAuthenticated)
</script>

<template>
  <div class="container mx-auto px-4 py-16">
    <div class="max-w-2xl mx-auto text-center">
      <h1 class="text-4xl md:text-5xl font-bold text-primary-light mb-6">
        Mantimon TCG
      </h1>
      <p class="text-xl text-gray-300 mb-8">
        A single-player trading card game adventure inspired by the
        classic Gameboy Color Pokemon TCG.
      </p>

      <div
        v-if="isAuthenticated"
        class="space-y-4"
      >
        <RouterLink
          to="/campaign"
          class="btn btn-primary block w-full text-lg py-3"
        >
          Continue Campaign
        </RouterLink>
        <RouterLink
          to="/collection"
          class="btn btn-secondary block w-full text-lg py-3"
        >
          View Collection
        </RouterLink>
      </div>

      <div
        v-else
        class="space-y-4"
      >
        <RouterLink
          to="/register"
          class="btn btn-primary block w-full text-lg py-3"
        >
          Start Your Journey
        </RouterLink>
        <RouterLink
          to="/login"
          class="btn btn-secondary block w-full text-lg py-3"
        >
          Continue Adventure
        </RouterLink>
      </div>

      <div class="mt-16 grid grid-cols-1 md:grid-cols-3 gap-8 text-left">
        <div class="bg-surface p-6 rounded-lg">
          <h3 class="text-lg font-bold text-type-fire mb-2">
            Campaign Mode
          </h3>
          <p class="text-gray-400">
            Challenge NPCs at themed clubs, defeat leaders, and collect medals.
          </p>
        </div>
        <div class="bg-surface p-6 rounded-lg">
          <h3 class="text-lg font-bold text-type-water mb-2">
            Build Your Deck
          </h3>
          <p class="text-gray-400">
            Collect cards from booster packs and build powerful decks.
          </p>
        </div>
        <div class="bg-surface p-6 rounded-lg">
          <h3 class="text-lg font-bold text-type-lightning mb-2">
            PvP Battles
          </h3>
          <p class="text-gray-400">
            Test your skills against other players in multiplayer matches.
          </p>
        </div>
      </div>
    </div>
  </div>
</template>
