"use client"; // Overlay wrapper for the nav-driven section panels of the /trade-in/v2 // "МЕРА Оценка" design. Faithful port of the design overlay container // (МЕРА Оценка.dc.html lines 443-453 + 615-616): a glass/blur absolute layer // with HUD corner brackets, a header (section number + title + "← К ОЦЕНКЕ" // button) and a scrollable body that swaps the active view. import { tokens } from "./tokens"; import { overlayNums, overlayTitles } from "./fixtures"; import HistoryView from "./HistoryView"; import SourcesView from "./SourcesView"; import AnalyticsView from "./AnalyticsView"; import { CacheView } from "./CacheView"; import type { CacheData, HistoryData, SourcesData } from "./mappers"; import type { Analytics } from "./types"; interface SectionOverlayProps { active: number; onClose: () => void; onNavigate: (i: number) => void; // Mapped overlay data, fed by page.tsx (mapHistory / mapSources / mapAnalytics // / mapCache). Optional so unwired/storybook usage falls back to each view's // fixture default. history?: HistoryData; sources?: SourcesData; analytics?: Analytics; cache?: CacheData; } export default function SectionOverlay({ active, onClose, onNavigate, history, sources, analytics, cache, }: SectionOverlayProps) { return (
{/* HUD corner brackets */}
{/* overlay header */}
{overlayNums[active]} {overlayTitles[active]}
К ОЦЕНКЕ
{/* overlay body */}
{active === 1 && } {active === 2 && } {active === 3 && ( )} {active === 4 && }
); }