<script setup lang="ts">
definePageMeta({ layout: false })

const supabase = useSupabaseClient()
const router = useRouter()

onMounted(async () => {
  const { data } = await supabase.auth.getSession()
  if (data.session) {
    await router.push('/')
  } else {
    await router.push('/login')
  }
})
</script>

<template>
  <UApp>
    <div class="min-h-screen flex items-center justify-center">
      <div class="text-center space-y-4">
        <UIcon name="i-lucide-loader-circle" class="text-5xl text-primary-500 animate-spin" />
        <p class="text-gray-600 dark:text-gray-400">인증 처리 중...</p>
      </div>
    </div>
  </UApp>
</template>
