import type { DayView, Station } from '../../api/traffic'; import type { LocationSummary } from '../../api/watercraft'; import { formatNumber } from '../../traffic/format'; import { sumCounts } from '../../traffic/vehicleClasses'; interface MunicipalityContextProps { stations: Station[] | null; locations: LocationSummary[] | null; day: DayView | null; hour: number; year: number; onSelectStation: (code: number) => void; onSelectLocation: (name: string) => void; } export function MunicipalityContext({ stations, locations, day, hour, year, onSelectStation, onSelectLocation, }: MunicipalityContextProps) { if (!stations && !locations) { return null; } const dayByStation = new Map(day?.stations.map((s) => [s.code, s]) ?? []); const hourLabel = `${String(hour).padStart(2, '0')}:00`; return (

In dieser Gemeinde

{stations && (stations.length > 0 ? ( ) : (

Keine Verkehrszählstelle.

))} {locations && (locations.length > 0 ? ( ) : (

Kein Bootsstandort.

))}
); }