import { getSessionUser } from "@/lib/auth";
import { PageHeader } from "@/components/layout/PageHeader";
import { ProfileClient } from "./ProfileClient";
import { redirect } from "next/navigation";

export default async function ProfilePage() {
  const user = await getSessionUser();
  if (!user) redirect("/login");

  return (
    <div className="space-y-6">
      <PageHeader
        title="Profil & Pengaturan Akun"
        description="Kelola informasi identitas pribadi, kontak aktif, dan keamanan kata sandi akun LMS Anda."
        breadcrumbs={[{ label: "Profil Akun" }]}
      />
      <ProfileClient currentUser={user} />
    </div>
  );
}
