import { AdminPermissionGate } from "@/components/admin/admin-permission-gate";
import { DrawResultsConsole } from "@/modules/draws/draw-results-console";
import { DrawReviewConsole } from "@/modules/draws/draw-review-console";
import { PRD_DRAW_ACCESS_ANY, PRD_DRAW_RESULT_MANAGE } from "@/lib/admin-prd";

export default async function AdminDrawResultsPage(props: {
  params: Promise<{ drawId: string }>;
}) {
  const { drawId } = await props.params;
  return (
    <AdminPermissionGate requiredAny={PRD_DRAW_ACCESS_ANY}>
      <div className="space-y-6">
        <DrawResultsConsole drawId={drawId} />
        <AdminPermissionGate requiredAny={[PRD_DRAW_RESULT_MANAGE]}>
          <DrawReviewConsole drawId={drawId} />
        </AdminPermissionGate>
      </div>
    </AdminPermissionGate>
  );
}
