'use client'; import React from 'react'; export default function SanctionsMatches({ ss, title }: { // eslint-disable-next-line @typescript-eslint/no-explicit-any ss?: any; title?: string; }) { if (!ss) return null; const ofacMatches = ss?.ofac_screen?.matches && (ss.ofac_screen.matches.length > 0); const cslDetails = ss?.csl_details && (Array.isArray(ss.csl_details) ? ss.csl_details.length > 0 : Object.keys(ss.csl_details || {}).length > 0); const fbiMatches = ss?.fbi_matches && (ss.fbi_matches.length > 0); if (!(ofacMatches || cslDetails || fbiMatches)) return null; return (

{title || 'Sanctions Matches'}

{ofacMatches && (
OFAC API Matches
{ss!.ofac_screen!.matches!.map((m: any, i: number) => { const s = m?.sanction; const t = s?.name || 'Unknown'; const programs = (s?.programs && s?.programs.length) ? ` — Programs: ${s?.programs.join(', ')}` : ''; return (
); })}
View OFAC Raw JSON
{JSON.stringify(ss!.ofac_screen!.raw, null, 2)}
)} {cslDetails && (
U.S. CSL Details
View CSL Raw JSON
{JSON.stringify(ss!.csl_details, null, 2)}
)} {fbiMatches && (
FBI Wanted List Matches
{ss!.fbi_matches!.map((f: any, i: number) => (
))}
)}
); }