import { getServerSession } from "next-auth/next";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { redirect } from "next/navigation";
import { ResponsiveIframe } from "@/app/components/responsive-iframe";

export default async function Page() {
  const session = await getServerSession(authOptions);

  if (!session) {
    redirect("/signin");
  }

  // Use the proxy URL instead of the direct service URL
  const proxyUrl = `/api/proxy/parole`;

  return (
    <main className="w-full h-screen bg-black">
      <div className="w-full h-full px-4 pt-12 pb-4">
        <ResponsiveIframe 
          src={proxyUrl}
          allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
        />
      </div>
    </main>
  );
} 