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

export const metadata: Metadata = buildPageMetadata("draws", "subnav.finance");

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