<template>
  <footer class="bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 mt-auto">
    <div class="container mx-auto px-4 py-8">
      <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
        <div>
          <h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">
            LinkShare Blog
          </h3>
          <p class="text-gray-600 dark:text-gray-400 text-sm">
            分享技术与生活
          </p>
        </div>

        <div>
          <h4 class="text-sm font-semibold text-gray-900 dark:text-white mb-4">
            链接
          </h4>
          <ul class="space-y-2">
            <li>
              <UButton to="/" variant="link" class="p-0 h-auto text-gray-600 dark:text-gray-400">
                首页
              </UButton>
            </li>
            <li>
              <UButton
                v-if="isAuthenticated"
                to="/create"
                variant="link"
                class="p-0 h-auto text-gray-600 dark:text-gray-400"
              >
                写文章
              </UButton>
            </li>
          </ul>
        </div>

        <div>
          <h4 class="text-sm font-semibold text-gray-900 dark:text-white mb-4">
            关于
          </h4>
          <p class="text-gray-600 dark:text-gray-400 text-sm">
            &copy; {{ new Date().getFullYear() }} LinkShare Blog. All rights reserved.
          </p>
        </div>
      </div>
    </div>
  </footer>
</template>

<script setup lang="ts">
const { isAuthenticated } = useAuth()
</script>
