'use client'; import type { RecentThought } from '@/entities/session'; import type { AppHubVisualMode } from '@/shared/config/appHubVisualMode'; import { cn } from '@/shared/lib/cn'; import { AppUtilityDrawer } from './AppUtilityDrawer'; import { type AppUtilityPanelId } from '../model/types'; import { InboxDrawerPanel } from './panels/InboxDrawerPanel'; import { SettingsDrawerPanel } from './panels/SettingsDrawerPanel'; import { StatsDrawerPanel } from './panels/StatsDrawerPanel'; interface AppUtilityRailWidgetProps { visualMode: AppHubVisualMode; activePanel: AppUtilityPanelId | null; thoughts: RecentThought[]; thoughtCount: number; onOpenPanel: (panel: AppUtilityPanelId) => void; onClosePanel: () => void; onClearInbox: () => void; } const RAIL_ITEMS: Array<{ id: AppUtilityPanelId; icon: string; label: string; }> = [ { id: 'inbox', icon: '📨', label: 'Inbox' }, { id: 'stats', icon: '📊', label: 'Stats' }, { id: 'settings', icon: '⚙', label: 'Settings' }, ]; const PANEL_TITLE_MAP: Record = { inbox: '임시 보관함', stats: '집중 요약', settings: '설정', }; export const AppUtilityRailWidget = ({ visualMode, activePanel, thoughts, thoughtCount, onOpenPanel, onClosePanel, onClearInbox, }: AppUtilityRailWidgetProps) => { const cinematic = visualMode === 'cinematic'; return ( <>
{RAIL_ITEMS.map((item) => { const selected = activePanel === item.id; return ( ); })}
{activePanel === 'inbox' ? ( ) : null} {activePanel === 'stats' ? : null} {activePanel === 'settings' ? ( ) : null} ); };