"use client"; import CopyTextBox from "@app/components/CopyTextBox"; import { Alert, AlertDescription } from "@app/components/ui/alert"; import { aiConfigBlockHasPlaceholders, type AiConfigBlock } from "@app/lib/aiClientConfig"; import { cn } from "@app/lib/cn"; import { AlertCircle } from "lucide-react"; import { useTranslations } from "next-intl"; type AiConfigCodeBlockProps = { block: AiConfigBlock; step?: number; hideLabel?: boolean; }; export function AiConfigCodeBlock({ block, step, hideLabel = false }: AiConfigCodeBlockProps) { const t = useTranslations(); const label = step != null ? `${t("aiClientConfigStep", { number: step })}: ${block.label}` : block.label; return (
{!hideLabel ? (

{label}

) : null}
{aiConfigBlockHasPlaceholders(block) ? ( {t("aiClientConfigPlaceholderWarning")} ) : null}
); }