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

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

export default async function AdminDrawPublishBatchPage(props: {
  params: Promise<{ drawId: string; batchId: string }>;
}) {
  const { drawId, batchId } = await props.params;
  return (
    <AdminPermissionGate requiredAny={[PRD_DRAW_RESULT_MANAGE]}>
      <DrawPublishConsole drawId={drawId} batchId={batchId} />
    </AdminPermissionGate>
  );
}
