import { useSteamStore } from "@/store/steam"
import { useRouter } from "next/navigation"

const Header = () => {
  const steam = useSteamStore()
  const router = useRouter()

  return (
    <div className="pt-6 select-none pb-9" data-tauri-drag-region>
      <h1 className="mb-0.5 text-xl font-semibold tracking-wide w-fit active:scale-95 transition cursor-pointer" onClick={() => router.push('/users')}>
        {steam.currentUser()?.persona_name || 'CS工具箱'}
      </h1>
      <p className="text-sm font-light tracking-wide transition cursor-pointer text-zinc-400 w-fit active:scale-95" onClick={() => router.push('/users')}>
        {steam.currentUser()?.account_name || '本周使用CS工具箱 114 小时'}
      </p>
    </div>
  )
}

export default Header
