'use client' import { useState } from 'react' import { useTheme } from '@/lib/ThemeContext' import type { B2BHit } from '@/lib/AlertsB2BContext' import { getImportanceLabelColor, getDecisionLabelColor, formatDeadline } from '@/lib/AlertsB2BContext' import { DecisionTraceModal } from './DecisionTraceModal' export function HitDetailModal({ hit, onClose, onFeedback }: { hit: B2BHit onClose: () => void onFeedback: (feedback: 'relevant' | 'irrelevant') => void }) { const { isDark } = useTheme() const [showTrace, setShowTrace] = useState(false) return (
{/* Header */}
{hit.importanceLabel} {hit.decisionLabel === 'relevant' ? 'Relevant' : hit.decisionLabel === 'needs_review' ? 'Pruefung noetig' : 'Irrelevant'} Score: {hit.importanceScore}
{/* Title */}

{hit.title}

{/* Metadata */}
{hit.buyerGuess && ( 🏛️ {hit.buyerGuess} )} {hit.countryGuess && ( 🌍 {hit.countryGuess} )} {hit.deadlineGuess && ( 📅 Frist: {formatDeadline(hit.deadlineGuess)} )}
{/* Snippet */}

{hit.snippet}

{/* Source Info */}
{hit.sourceType === 'email' ? '📧 Email' : '📡 RSS'} Original ansehen →
{/* Actions */}
{/* Feedback */}
War das relevant?
{/* Decision Trace */}
{/* Decision Trace Modal */} {showTrace && ( setShowTrace(false)} /> )}
) }