import { requireParticipantContext } from "@/lib/auth/require-participant";
import { ParticipantShell } from "@/components/features/participant/ParticipantShell";

export default async function ParticipantLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const { session, profile } = await requireParticipantContext();

  return (
    <ParticipantShell
      userName={session.user.name ?? "Participant"}
      paused={profile.status === "paused"}
    >
      {children}
    </ParticipantShell>
  );
}
