"use client"; import type { CSSProperties, ReactNode } from "react"; import Map, { type MapFeaturePayload } from "@/uhm/components/Map"; import ReplayPreviewLayerPanel from "@/uhm/components/editor/ReplayPreviewLayerPanel"; import PublicWikiSidebar from "@/uhm/components/wiki/PublicWikiSidebar"; import TimelineBar from "@/uhm/components/ui/TimelineBar"; import type { MapHoverPopupContent } from "@/uhm/components/map/useMapHoverPopup"; import type { Entity } from "@/uhm/api/entities"; import type { Wiki } from "@/uhm/api/wikis"; import type { BackgroundLayerId, BackgroundLayerVisibility } from "@/uhm/lib/map/styles/backgroundLayers"; import type { FeatureCollection } from "@/uhm/types/geo"; import type { Feature } from "@/uhm/lib/editor/state/useEditorState"; type Props = { renderDraft: FeatureCollection; labelContextDraft: FeatureCollection; labelTimelineYear?: number | null; selectedFeatureIds: (string | number)[]; onSelectFeatureIds: (ids: (string | number)[]) => void; backgroundVisibility: BackgroundLayerVisibility; geometryVisibility: Record; onToggleBackground: (id: BackgroundLayerId) => void; onToggleGeometry: (typeKey: string) => void; timelineYear: number; onTimelineYearChange: (year: number) => void; timelineTimeRange?: number; onTimelineTimeRangeChange?: (range: number) => void; timelineFilterEnabled?: boolean; onTimelineFilterEnabledChange?: (enabled: boolean) => void; isTimelineLoading: boolean; timelineDisabled?: boolean; timelineStatusText?: string | null; timelineStyle?: CSSProperties; onFeatureClick?: (payload: MapFeaturePayload | null) => void; hoverPopupEnabled?: boolean; getHoverPopupContent?: (feature: Feature) => MapHoverPopupContent | null; activeEntity?: Entity | null; activeWiki?: Wiki | null; isWikiLoading?: boolean; wikiError?: string | null; onCloseWikiSidebar?: () => void; onWikiLinkRequest?: (request: { slug: string; rect: DOMRect }) => void; sidebarWidth?: number; onSidebarWidthChange?: (width: number) => void; maxSidebarDragWidth?: number; onPlayPreviewReplay?: () => void; mapHandleRef?: React.RefObject; overlay?: ReactNode; children?: ReactNode; }; export default function PreviewMapShell({ renderDraft, labelContextDraft, labelTimelineYear, selectedFeatureIds, onSelectFeatureIds, backgroundVisibility, geometryVisibility, onToggleBackground, onToggleGeometry, timelineYear, onTimelineYearChange, timelineTimeRange, onTimelineTimeRangeChange, timelineFilterEnabled, onTimelineFilterEnabledChange, isTimelineLoading, timelineDisabled = false, timelineStatusText = null, timelineStyle, onFeatureClick, hoverPopupEnabled = false, getHoverPopupContent, activeEntity = null, activeWiki = null, isWikiLoading = false, wikiError = null, onCloseWikiSidebar, onWikiLinkRequest, sidebarWidth, onSidebarWidthChange, maxSidebarDragWidth, onPlayPreviewReplay, mapHandleRef, overlay, children, }: Props) { return (
{overlay} {activeEntity ? ( ) : null} {children}
); }