"use client"; import { AlertTriangle } from "lucide-react"; import type { NormalizationMetadata } from "@/lib/types"; import { cn } from "@/lib/utils"; type NormalizationSummaryProps = { normalization: NormalizationMetadata; showHeader?: boolean; className?: string; }; function SummaryField(props: { label: string; value: string; tone?: "default" | "warning"; }) { return (

{props.label}

{props.value}

); } export function NormalizationSummary({ normalization, showHeader = true, className, }: NormalizationSummaryProps) { const hasMaterialUnmapped = normalization.materialUnmappedRowCount > 0; const hasWarnings = normalization.warnings.length > 0; return (
{showHeader ? (

Normalization Summary

Pack, parser, and residual mapping health for the compact statement surface.

) : null}
{hasWarnings ? (

Parser Warnings

{normalization.warnings.map((warning) => ( {warning} ))}
) : null} {hasMaterialUnmapped ? (

Material unmapped rows were detected for this filing set. Use the inspector and detail rows before relying on cross-company comparisons.

) : null}
); }