"use client"; import clsx from "clsx"; import { useDashboardStore } from "@/hooks/useDashboardStore"; import { getCityScenery } from "@/lib/dashboard-scenery"; import { getCityProfileStats, getClimateDrivers, getRiskBadgeLabel, getSettlementRiskNarrative, } from "@/lib/dashboard-utils"; import { ForecastTable } from "@/components/dashboard/PanelSections"; export function DetailPanel() { const store = useDashboardStore(); const detail = store.selectedDetail; const isOverlayOpen = Boolean(store.futureModalDate) || store.historyState.isOpen || store.isGuideOpen; const isVisible = store.isPanelOpen && Boolean(store.selectedCity) && Boolean(detail) && !store.loadingState.cityDetail && !isOverlayOpen; const profileStats = detail ? getCityProfileStats(detail) : []; const riskLines = detail ? getSettlementRiskNarrative(detail) : []; const climateDrivers = detail ? getClimateDrivers(detail) : []; const scenery = getCityScenery(detail?.name); return ( ); }