import { AdjustmentsHorizontalIcon, ArrowUturnLeftIcon, CalendarDaysIcon, ChevronDoubleLeftIcon, ChevronDoubleRightIcon, MapIcon, SwatchIcon, } from '@heroicons/react/24/outline' export type CensusMapRailSection = 'year' | 'view' | 'scale' | 'values' interface CensusMapLeftRailProps { activeSection: CensusMapRailSection | null /** * Open a display control. ``anchorRect`` is the clicked button's viewport * rect, so callers that render the control as a rail-anchored popover can * position it; callers using a drawer can ignore it. */ onOpen: (section: CensusMapRailSection, anchorRect?: DOMRect) => void /** Tag shown next to the year icon, e.g. "2024". Truncated if long. */ yearBadge?: string /** Resets the map to the nation view. Disabled when already there. */ onReset?: () => void /** True if there's anywhere to reset to (i.e. user has zoomed in). */ canReset?: boolean /** * When provided, renders a bottom toggle for the adjacent metric panel. * ``metricPanelOpen`` drives the icon direction. Omit on surfaces without a * metric browser (the icon simply doesn't render). */ onToggleMetricPanel?: () => void metricPanelOpen?: boolean } interface RailItem { id: CensusMapRailSection label: string hint: string icon: typeof CalendarDaysIcon } const RAIL_ITEMS: RailItem[] = [ { id: 'year', label: 'Year', hint: 'ACS end year and play through history', icon: CalendarDaysIcon }, { id: 'view', label: 'View', hint: 'Filled map vs bubbles', icon: MapIcon }, { id: 'scale', label: 'Color', hint: 'How values stretch across colors', icon: SwatchIcon }, { id: 'values', label: 'Numbers', hint: 'Raw, year-over-year, or vs national', icon: AdjustmentsHorizontalIcon }, ] export default function CensusMapLeftRail({ activeSection, onOpen, yearBadge, onReset, canReset = false, onToggleMetricPanel, metricPanelOpen = true, }: CensusMapLeftRailProps) { return ( ) }