import { Suspense } from "react";
import { Card, CardContent } from "@/components/ui/card";
import SessionViewClient from "./SessionViewClient";

export const metadata = {
  title: "Session Details | LiveDash",
  description: "View detailed session information and conversation history",
};

// Provide at least one sample param for build-time validation
// Runtime params not in this list will be handled dynamically
export async function generateStaticParams() {
  return [{ id: "sample" }];
}

function SessionLoadingFallback() {
  return (
    <div className="space-y-6">
      <Card>
        <CardContent className="pt-6">
          <div className="text-center py-8 text-muted-foreground">
            Loading session...
          </div>
        </CardContent>
      </Card>
    </div>
  );
}

export default function SessionViewPage() {
  return (
    <Suspense fallback={<SessionLoadingFallback />}>
      <SessionViewClient />
    </Suspense>
  );
}
