"use client";

import Link from "next/link";
import { useTranslation } from "react-i18next";

import {
  AdminSubnavBar,
  adminSubnavItemClassName,
} from "@/components/admin/admin-subnav";
import { cn } from "@/lib/utils";

export function RiskSubnav({ drawId }: { drawId: string }) {
  const { t } = useTranslation("risk");
  const base = `/admin/draws/${drawId}/risk/pools`;

  return (
    <AdminSubnavBar className="mb-6">
      <Link href={base} className={cn(adminSubnavItemClassName(true))}>
        {t("subnavPools")}
      </Link>
      <Link
        href="/admin/draws"
        className={cn(adminSubnavItemClassName(false), "text-muted-foreground")}
      >
        {t("changeDraw")}
      </Link>
    </AdminSubnavBar>
  );
}
