diff --git a/src/components/Report/ReportPreview.tsx b/src/components/Report/ReportPreview.tsx new file mode 100644 index 0000000..605dbbe --- /dev/null +++ b/src/components/Report/ReportPreview.tsx @@ -0,0 +1,82 @@ +import React from 'react'; +import type { ReportConfig } from './reportHelpers'; +import { formatPeriodLabel, estimatePageCount } from './reportHelpers'; + +interface Props { config: ReportConfig; } + +export default function ReportPreview({ config: cfg }: Props) { + const color = cfg.accentColor; + const period = formatPeriodLabel(cfg.startDate, cfg.endDate, cfg.language); + const pages = estimatePageCount(cfg); + + return ( +
+
Preview ยท ~{pages} pages
+ + {/* Cover page mockup */} +
+
+ HiHala Data + {cfg.clientLogoBase64 && ( + Client logo + )} +
+
+
+ {cfg.title || Report Title} +
+ {cfg.clientName && ( +
Prepared for: {cfg.clientName}
+ )} + {cfg.contactName && ( +
Attention: {cfg.contactName}
+ )} +
{period}
+
+
+
+ + {/* Content page mockup */} +
+
+ HiHala Data + {cfg.title || 'Report'} + 2 +
+ + {cfg.showExecutiveSummary && ( +
+
Executive Summary
+
+
+
+
+
+
+ )} + + {cfg.showMetricsTable && ( +
+
Key Metrics
+
+ {['Revenue', 'Visitors', 'Tickets', 'Avg Rev'].map(r => ( +
+ {r} +
+ {cfg.includeComparison &&
} +
+ ))} +
+
+ )} + + {cfg.showTrendChart && ( +
+
Trend
+
+
+ )} +
+
+ ); +}