/* BioReveal — Reveal page (v0.9 — analysis-first).
*
* Renders the AI's REAL analysis of the patient. No raw biomarker numbers
* displayed — the AI interpreted them and wrote the read. Same render path
* for both Claude and rules-engine output (they share schema).
*/
const PEPTIDE_PRICES = {
"Sermorelin": 179, "NAD+": 189, "BPC-157": 149, "Glutathione": 119,
"Ipamorelin": 169, "GHK-Cu": 159, "Selank": 139, "DSIP": 129,
"B12 / MIC": 99, "CJC-1295": 169, "TB-500": 219, "Tesamorelin": 199,
"Epitalon": 149, "Semax": 149, "PT-141": 119,
};
const StepAnalysis = ({ onStart, error, onRetry }) => {
const lines = [
"Reading what you said you want fixed",
"Cross-checking your health background",
"Reading the bioscan",
"Listening to what you said",
"Picking the right peptides for you",
"Writing your personal read",
];
const [i, setI] = React.useState(0);
const startedRef = React.useRef(false);
React.useEffect(() => { if (!startedRef.current) { startedRef.current = true; onStart(); } }, []);
React.useEffect(() => {
if (error || i >= lines.length) return;
const t = setTimeout(() => setI(i + 1), 700);
return () => clearTimeout(t);
}, [i, error]);
return (
{error ? "Synthesis paused" : "Writing your analysis"}