import { useEffect, useState } from 'react' // Gauge is the animated Mission Readiness™ score dial (Screening Results Section B). export function Gauge({ value, color, status, }: { value: number color: string status: string }) { const size = 230 const stroke = 16 const r = (size - stroke) / 2 const c = 2 * Math.PI * r // animate from 0 on mount / value change const [shown, setShown] = useState(0) useEffect(() => { const id = requestAnimationFrame(() => setShown(value)) return () => cancelAnimationFrame(id) }, [value]) const offset = c * (1 - Math.max(0, Math.min(100, shown)) / 100) return (