import { memo } from 'react' import type { VaultEntry } from '../types' import { cn } from '@/lib/utils' import { MagnifyingGlass, GitBranch, CursorText, Sparkle, SlidersHorizontal, DotsThree, Trash, ArrowCounterClockwise, Archive, ArrowUUpLeft, } from '@phosphor-icons/react' interface BreadcrumbBarProps { entry: VaultEntry wordCount: number isModified: boolean showDiffToggle: boolean diffMode: boolean diffLoading: boolean onToggleDiff: () => void showAIChat?: boolean onToggleAIChat?: () => void inspectorCollapsed?: boolean onToggleInspector?: () => void onTrash?: () => void onRestore?: () => void onArchive?: () => void onUnarchive?: () => void } const DISABLED_ICON_STYLE = { opacity: 0.4, cursor: 'not-allowed' } as const function BreadcrumbActions({ entry, showDiffToggle, diffMode, diffLoading, onToggleDiff, showAIChat, onToggleAIChat, inspectorCollapsed, onToggleInspector, onTrash, onRestore, onArchive, onUnarchive, }: Omit) { return (
{showDiffToggle ? ( ) : ( )} {entry.archived ? ( ) : ( )} {entry.trashed ? ( ) : ( )} {inspectorCollapsed && ( )}
) } export const BreadcrumbBar = memo(function BreadcrumbBar({ entry, wordCount, isModified, ...actionProps }: BreadcrumbBarProps) { return (
{/* Left: breadcrumb */}
{entry.isA || 'Note'} {entry.title} · {wordCount.toLocaleString()} words {isModified && ( <> · M )}
{/* Right: action icons */}
) })