"use client"; /** * InvestScoreBlock — hero score panel (col 3): big /10 invest-score number + a * buy-signal badge. In INCREMENT 1 the invest-score and buy-signal are * PLACEHOLDERS (surfaced after the §22 forecast / Scenarios), so the big number * renders muted "—" with a caption instead of a fabricated value. */ import styles from "@/app/site-finder/analysis/[cad]/ptica/ptica.module.css"; import type { ParcelAnalysis } from "@/types/site-finder"; import type { ForecastReport } from "@/types/forecast"; import { adaptInvestScore } from "@/components/site-finder/ptica/ptica-adapt"; import type { DrawerKey } from "@/components/site-finder/ptica/drawers/drawer-keys"; interface Props { analysis: ParcelAnalysis; /** §22 forecast report — when ready, surfaces the REAL invest-score / buy-signal. */ forecastReport?: ForecastReport; onOpenDrawer: (key: DrawerKey) => void; } export function InvestScoreBlock({ analysis, forecastReport, onOpenDrawer, }: Props) { const inv = adaptInvestScore(analysis, forecastReport); return (
Инвест-скор
{inv.score.isReal ? ( <> {inv.score.value} / 10 ) : ( )}
{inv.score.caption && ( {inv.score.caption} )}
Потенциал {inv.potential.value}
Риск {inv.risk.value}
Buy Signal {inv.buySignal.isReal ? inv.buySignal.value : "после прогноза"}
); }