import { useState, type ReactNode } from 'react'; import { Menu, Search } from 'lucide-react'; import { Button } from './ui/button'; import { Sheet, SheetContent, SheetTrigger } from './ui/sheet'; import { cn } from '@/lib/utils'; import { usePaletteState } from './GlobalCommandPalette'; import type { NavItem, ActiveView } from './EditorLayout/hooks/useViewNavigationState'; interface MobileMoreMenuProps { /** The already-gated nav items (admin / remote / paid filtering applied). */ navItems: NavItem[]; activeView: ActiveView; onNavigate: (value: ActiveView) => void; /** Theme switch + account controls, pinned to the bottom of the sheet. */ footer?: ReactNode; } /** * The "more destinations" affordance for the mobile content screens. On a phone * the global TopBar is dropped and each screen's masthead leads, so this hosts * the full destination list plus the theme and account controls. It lists every * gated nav item (the bottom tab bar's primaries included) so the same menu * opens the same set on every screen, rather than changing contents per page. */ export function MobileMoreMenu({ navItems, activeView, onNavigate, footer }: MobileMoreMenuProps) { const [open, setOpen] = useState(false); // The Stacks list drops the TopBar (which hosted the global search), so the // command palette is reachable here instead. const { setOpen: setPaletteOpen } = usePaletteState(); return (

Navigate

{footer ? (
{footer}
) : null}
); }