import { buildPageMetadata } from "@/lib/page-metadata";
import { AdminPermissionGate } from "@/components/admin/admin-permission-gate";
import { DrawDetailConsole } from "@/modules/draws/draw-detail-console";
import { PRD_DRAW_ACCESS_ANY } from "@/lib/admin-prd";
import type { Metadata } from "next";

export const metadata: Metadata = buildPageMetadata("draws", "drawDetail");

export default async function AdminDrawDetailPage(props: {
  params: Promise<{ drawId: string }>;
}) {
  const { drawId } = await props.params;
  return (
    <AdminPermissionGate requiredAny={PRD_DRAW_ACCESS_ANY}>
      <DrawDetailConsole drawId={drawId} />
    </AdminPermissionGate>
  );
}
