import React from 'react'; import type { AgentReview, SubReview, RagStatus, OverallStatus } from '../types'; import { BarclaysLogo } from './icons/BarclaysLogo'; import { OliverLogo } from './icons/OliverLogo'; import { LegalIcon } from './icons/LegalIcon'; import { BrandIcon } from './icons/BrandIcon'; import { ChannelIcon } from './icons/ChannelIcon'; interface PDFReportProps { campaignName: string; proofs: any[]; } const formatFeedbackTextForPDF = (text: string): React.ReactNode => { if (!text) return null; // Normalize HTML tags and bullet characters let normalizedText = text .replace(/<\/li>/gi, '\n') .replace(/<\/ul>/gi, '\n') .replace(/
{introLines.join(' ')}
)} {bulletLines.length > 0 && ({isCampaignReport ? 'Campaign-Level Summary' : 'Single Proof Analysis'}
Campaign: {campaignName}
{!isCampaignReport &&Proof: {singleProofName}
}Export Date: {today}
{version.workfrontId} • {proof.channel} / {proof.subChannel}
Status: {feedback.overallStatus}
{feedback.overallStatus === 'Requires Manual Legal Review' && (Financial Promotion Detected:
"{feedback.financialPromotionReason}"