'use client'

import { useSession } from '@/lib/auth-client'
import { Spinner } from '@/components/ui/spinner'

export function Header() {
  const { data: session, isPending } = useSession()

  if (isPending) {
    return (
      <header className="h-16 border-b bg-white flex items-center justify-center px-6">
        <Spinner size="sm" />
      </header>
    )
  }

  return (
    <header className="h-16 border-b bg-white flex items-center justify-between px-6">
      <h2 className="text-lg font-semibold">关卡配置管理</h2>
      <div className="flex items-center gap-4">
        <span className="text-sm text-gray-500">
          {session?.user?.email}
        </span>
      </div>
    </header>
  )
}
