import { Header } from "@/components/layout/header";
import { LayeredQueryResults } from "@/components/layered";

interface LayeredPageProps {
  searchParams: Promise<{ subject?: string; predicate?: string }>;
}

export default async function LayeredPage({ searchParams }: LayeredPageProps) {
  const params = await searchParams;
  const initialSubject = params.subject;
  const initialPredicate = params.predicate;

  return (
    <>
      <Header title="Layered Consensus" />
      <div className="p-6">
        <LayeredQueryResults
          initialSubject={initialSubject}
          initialPredicate={initialPredicate}
        />
      </div>
    </>
  );
}
