// 03 СВОДКА ОБЪЕКТА — right-rail summary card for the /trade-in/v2 "МЕРА Оценка" // design port. Faithful markup port of МЕРА Оценка.dc.html lines 397-422: // address + "В РАСЧЁТЕ" badge, four clickable per-section totals, and a // "КАЧЕСТВО ДАННЫХ" block with a donut. Data from fixtures; clicks fire // onNavigate(row.nav) only — no API, no fetching. "use client"; import { tokens } from "./tokens"; import { object, summary } from "./fixtures"; import type { ObjectSummaryData } from "./mappers"; // Default presentation data (unwired usage): the existing design fixtures. const OBJECT_SUMMARY_FIXTURE: ObjectSummaryData = { object, summary }; interface ObjectSummaryProps { data?: ObjectSummaryData; onNavigate: (i: number) => void; } // Audit M11 — name the unnamed «N · XX,XX млн» numbers. Each summary row value // is built in mappers.mapSummary as "count · metric"; the metric is different // per row. This caption labels each ·-separated token token-for-token. Keyed by // label content so it matches both the mapper labels ("Продажи рядом") and the // older fixture labels ("Продажи в доме"). Sources in mappers.mapSummary: // Продажи рядом : houseSold · kpi.median_exposure_days // Аналоги : e.n_analogs · e.median_price_rub (H3 — SAME field as the // 02-РЕЗУЛЬТАТ hero «медиана объявлений», not the raw analog // listing-price median which read far higher over the same set) // Сделки : dealCount · streetDeals.median_price_rub ?? median(deals) // Аналитика : kpi.median_exposure_days · -kpi.median_bargain_pct function rowHint(label: string): string { if (label.startsWith("Продажи")) return "кол-во · медиана экспозиции"; if (label === "Аналоги") return "кол-во · медиана объявлений"; if (label === "Сделки") return "кол-во · медиана сделок"; if (label === "Аналитика") return "экспозиция · торг"; return ""; } export function ObjectSummary({ data = OBJECT_SUMMARY_FIXTURE, onNavigate, }: ObjectSummaryProps) { return (