import { useTranslation } from "react-i18next";

import { AdminStatusBadge } from "@/components/admin/admin-status-badge";
import { resolveAdminStatusTone } from "@/lib/admin-status-tone";

export function ConfigStatusBadge({
  status,
  className,
}: {
  status: string;
  className?: string;
}) {
  const { t } = useTranslation("config");
  const label = t(`versionStatus.${status}`, { defaultValue: status });

  return (
    <AdminStatusBadge status={status} tone={resolveAdminStatusTone(status)} className={className}>
      {label}
    </AdminStatusBadge>
  );
}
