import { useI18n } from "../i18n"; import type { ReactNode } from "react"; import { Card, CardContent, CardHeader } from "../components/ui/card"; import { Badge } from "../components/ui/badge"; import type { CtePlanCte, CtePlanFilter, CtePlanV2 } from "./artifactV2"; const CHIP = "min-w-0 max-w-full whitespace-pre-wrap [overflow-wrap:anywhere] rounded-md bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground/90"; const FIELD_LABEL = "text-xs font-semibold text-muted-foreground"; function Chip({ children }: { children: ReactNode }) { return {children}; } function FilterRow({ filter, index }: { filter: CtePlanFilter; index: number }) { const { t } = useI18n(); return (
{t("Column")}
{filter.column}
{t("Operator")}
{filter.op}
{t("Value")}
{filter.value}
{filter.description}
> )} {filter.rationale && ( <> {t("Rationale")}{filter.rationale}
> )}{cte.purpose}
)}{t("No dependencies")}
)}
{table.name}
{table.description && (
{table.description}
)}{cte.rationale}
{t("Question")}
{plan.question}
{t("Strategy")}
{plan.strategy}
{t("Execution order")}