import * as React from "react"; import { AppHuddleBar } from "@/app/AppHuddleBar"; import * as BuzzTheme from "@/app/BuzzThemeSurfaces"; import { HuddleProvider, useHuddle } from "@/features/huddle"; import { HUDDLE_SHORTCUT_EVENT } from "@/shared/lib/keyboard-shortcuts"; import { RemindMeLaterProvider } from "@/features/reminders/ui/RemindMeLaterProvider"; import { cn } from "@/shared/lib/cn"; type AppHuddleShellProps = { children: React.ReactNode; currentPubkey?: string; isCompanionOpen: boolean; isDrawerOpen: boolean; isRoom: boolean; onCompanionOpen: () => void; onHuddleStartPendingChange: (pending: boolean) => void; onHuddleStarted: (ephemeralChannelId: string) => void | Promise; onShowHuddleInMainApp: (ephemeralChannelId: string) => void; onViewHuddleChannel: (ephemeralChannelId: string) => void; onVisibilityChange: (visible: boolean) => void; }; type HuddleShortcutHandlerProps = { children: React.ReactNode; }; function HuddleShortcutHandler({ children }: HuddleShortcutHandlerProps) { const { activeEphemeralChannelId, leaveHuddle } = useHuddle(); React.useEffect(() => { if (!activeEphemeralChannelId) return; function handleHuddleShortcut() { void leaveHuddle(); } window.addEventListener(HUDDLE_SHORTCUT_EVENT, handleHuddleShortcut); return () => window.removeEventListener(HUDDLE_SHORTCUT_EVENT, handleHuddleShortcut); }, [activeEphemeralChannelId, leaveHuddle]); return children; } export function AppHuddleShell({ children, currentPubkey, isCompanionOpen, isDrawerOpen, isRoom, onCompanionOpen, onHuddleStartPendingChange, onHuddleStarted, onShowHuddleInMainApp, onViewHuddleChannel, onVisibilityChange, }: AppHuddleShellProps) { return (
); }