/** * Sidebar — counterpart of sfx2/source/sidebar/SidebarController.cxx with its * TabBar and Deck. Decks are supplied by the application module (Writer * registers Properties, Styles and Navigator, as in Sidebar.xcu). */ import { X } from "lucide-react"; import type { ReactNode } from "react"; import { CommandImage } from "../../../vcl/source/image/ImplImageTree"; export interface SfxSidebarDeck { id: string; title: string; /** Command whose image is used for the tab. */ icon: string; content: ReactNode; } export function Sidebar({ decks, current, onDeck, onClose, }: { decks: SfxSidebarDeck[]; current: string; onDeck: (id: string) => void; onClose: () => void; }) { const deck = decks.find((d) => d.id === current) ?? decks[0]; return ( ); }