"use client"; /** * V2Passport — «Паспорт участка» card (prototype `.passport`). Renders REAL ЕГРН * fields via adaptPassport; absent fields show the honest «—» placeholder. The * "ПОДРОБНЕЕ →" link opens the passport drawer. */ import styles from "@/app/site-finder/analysis/[cad]/v2/v2.module.css"; import type { ParcelAnalysis } from "@/types/site-finder"; import { adaptPassport } from "@/components/site-finder/ptica/ptica-adapt"; import type { PticaField } from "@/components/site-finder/ptica/ptica-adapt"; import { V2CopyIcon } from "@/components/site-finder/ptica-v2/V2Icons"; import type { V2DrawerKey } from "@/components/site-finder/ptica-v2/v2-drawer-registry"; function Cell({ label, field, wide, big, }: { label: string; field: PticaField; wide?: boolean; big?: boolean; }) { return (
{label}
{field.value}
); } interface Props { analysis: ParcelAnalysis; onOpenDrawer: (key: V2DrawerKey) => void; } export function V2Passport({ analysis, onOpenDrawer }: Props) { const p = adaptPassport(analysis); return (
Паспорт участка
ID {p.cadNum}
Статус
{p.status.value}
); }