import { Box, Text } from "ink"; import type { ViewMode } from "../types/index.ts"; interface ViewModeIndicatorProps { mode: ViewMode; isLoadingGitHub?: boolean; githubError?: string | null; } const MODE_CONFIG: Record = { local: { label: "Local", color: "green", icon: "💻" }, github: { label: "GitHub", color: "magenta", icon: "☁" }, combined: { label: "All", color: "cyan", icon: "🔗" }, }; export function ViewModeIndicator({ mode, isLoadingGitHub, githubError }: ViewModeIndicatorProps) { const config = MODE_CONFIG[mode]; return ( {config.icon} [{config.label}] {isLoadingGitHub && ( )} {githubError && !isLoadingGitHub && ( )} (Tab) ); }