import { AlertTriangle } from 'lucide-react';
import type { DocumentDetail } from '@/features/documents/types';

type ClientMismatchBannerProps = {
    document: DocumentDetail;
};

export function ClientMismatchBanner({ document }: ClientMismatchBannerProps) {
    if (!document.has_client_mismatch) {
        return null;
    }

    return (
        <div className="rounded-md border border-destructive-soft bg-destructive-soft/40 px-3 py-2">
            <div className="flex items-center gap-2">
                <span className="rounded-sm bg-destructive-soft p-1 text-destructive-soft-foreground">
                    <AlertTriangle className="h-3.5 w-3.5" />
                </span>
                <p className="text-xs font-semibold uppercase tracking-wide text-destructive-soft-foreground">
                    Potențial document greșit atribuit
                </p>
            </div>
            <p className="mt-1 text-sm text-foreground">
                CIF-ul din document nu corespunde cu CIF-ul clientului selectat. Verificați dacă documentul aparține acestui client.
            </p>
        </div>
    );
}
