import { auth } from "@/lib/auth";
import { ChangePasswordForm } from "@/components/ChangePasswordForm";
import { ChangeEmailForm } from "@/components/ChangeEmailForm";

export default async function AdminParametresPage() {
  const session = await auth();

  return (
    <div className="space-y-6">
      <h1 className="text-lg font-bold text-[#07008b]">Paramètres du compte administrateur</h1>

      <div className="bg-white border border-slate-200 rounded-xl p-5">
        <h2 className="font-bold mb-4">Changer l&apos;email de connexion</h2>
        <ChangeEmailForm currentEmail={session!.user.email ?? ""} />
      </div>

      <div className="bg-white border border-slate-200 rounded-xl p-5">
        <h2 className="font-bold mb-4">Changer le mot de passe</h2>
        <ChangePasswordForm />
      </div>
    </div>
  );
}
