import { Fragment, type ReactNode } from 'react' import EmptyState from '../shared/EmptyState' import { MemoPlaceRow } from './PlacesSidebarRow' import type { SidebarState } from './usePlacesSidebar' import { usePluginViewContributions, PluginCardFooter } from '../Plugins/PluginContributions' export function PlacesList({ header, ...S }: SidebarState & { /** * A block that sits above the places and scrolls WITH them. * * The Dawarich panel lives here rather than in a band of its own above the list. As its * own band it could not grow: the list is the flex child that scrolls, so a panel with * ten stays in it squeezed the list to nothing and took the rail's scrolling with it, * and capping the panel left half its stays below a fold with no way to reach them. * Inside the scroller it simply opens to its full height and the rail scrolls past it. */ header?: ReactNode }) { const { filtered, scrollContainerRef, onScrollTopChange, filter, t, canEditPlaces, onAddPlace, categories, selectedPlaceId, plannedIds, inDaySet, selectedIds, selectMode, selectedDayId, isMobile, onPlaceClick, openContextMenu, placeMenuItems, onAssignToDay, toggleSelected, setDayPickerPlace, registerPlaceRow, tripId, } = S // Plugin-contributed columns/actions for the places view, keyed by place id (#plugins). const contribFor = usePluginViewContributions('places', tripId) return (