import { db } from "@/lib/db";
import MatchForm from "../MatchForm";

export default async function NewMatchPage() {
  const [countries, rounds] = await Promise.all([
    db.country.findMany({ orderBy: { name: "asc" } }),
    db.round.findMany({ orderBy: { number: "asc" } }),
  ]);
  return (
    <div className="max-w-xl">
      <h1 className="text-2xl font-bold mb-6">بازی جدید</h1>
      <MatchForm countries={countries} rounds={rounds} />
    </div>
  );
}
