import React from 'react'; import type { ScoreResult } from '../types'; import { getRiskEmoji } from '../engine/scoring'; import { BookingCTA } from './BookingCTA'; import { AlertTriangle } from 'lucide-react'; import styles from '../styles/results.module.css'; interface ResultsScreenProps { scoreResult: ScoreResult; consultantName: string; bookingUrl: string; } export const ResultsScreen: React.FC = ({ scoreResult, consultantName, bookingUrl, }) => { const { percentage, riskBand, headline, categoryScores, weakestCategories } = scoreResult; // SVG circle calculations. const radius = 65; const circumference = 2 * Math.PI * radius; const offset = circumference - (percentage / 100) * circumference; const bandColor: Record = { critical: 'var(--noon-danger)', high: 'var(--noon-warning)', moderate: '#eab308', low: 'var(--noon-success)', }; return (
{/* ── Score Header ─────────────────────────────────────────────────── */}
{percentage} out of 100
{getRiskEmoji(riskBand)} {headline.title}

{headline.text}

{/* ── Category Breakdown ───────────────────────────────────────────── */}

Category Breakdown

{categoryScores.map((cat) => (
{cat.name} {cat.score}%
))}
{/* ── Weakness Callout ──────────────────────────────────────────────── */} {weakestCategories.length > 0 && weakestCategories[0].score < 50 && (
Your biggest risks

Your weakest areas are {weakestCategories[0].name} {weakestCategories[1] && ( <> and {weakestCategories[1].name} )} . Addressing these first will have the highest impact on your overall health.

)} {/* ── Booking CTA ──────────────────────────────────────────────────── */}
); };