import { auth } from "@/lib/auth";
import { redirect } from "next/navigation";
import { OperatorDashboard } from "./operator-dashboard";

export const metadata = {
  title: "Operator Settings | LLMHosts",
  description: "Manage your marketplace operator settings",
};

export default async function OperatorPage() {
  const session = await auth();
  if (!session?.user?.id) redirect("/auth/signin");

  return (
    <div className="space-y-6">
      <div>
        <h1 className="text-2xl font-bold tracking-tight">
          Marketplace Operator
        </h1>
        <p className="text-gray-400 mt-1">
          Share your GPU compute on the marketplace and earn revenue.
        </p>
      </div>
      <OperatorDashboard userId={session.user.id} />
    </div>
  );
}
