// ========================================== // Chat Surface — Sidebar Component // ========================================== // Search bar, new chat, channels section, chats section with folders. // Footer has UserMenu (avatar) — all navigation lives in the menu flyout. import { SidebarChannels } from './sidebar-channels.js'; import { SidebarChats } from './sidebar-chats.js'; import { UserMenu } from '../../shell/user-menu.js'; const html = window.html; const { useCallback } = window.hooks; const PLUS_SVG = html` `; const SEARCH_SVG = html` `; const COLLAPSE_SVG = html` `; /** * @param {{ * sidebar: ReturnType, * activeId: string|null, * onSelectChat: (id: string) => void, * onSelectChannel: (id: string) => void, * onNewChat: () => void, * onCollapse: () => void, * }} props */ export function Sidebar({ sidebar, activeId, onSelectChat, onSelectChannel, onNewChat, onCollapse }) { const _onSearch = useCallback((e) => { sidebar.setSearch(e.target.value); }, [sidebar.setSearch]); return html` `; }