import React from 'react'; import { Clock3, FileDiff, LoaderCircle, Sparkles } from 'lucide-react'; interface FullDiffLoadingBannerProps { totalFilesCount: number; readyFilesCount: number; loadingFilesCount: number; snippetCount: number; activeFileName?: string; } export const FullDiffLoadingBanner = ({ totalFilesCount, readyFilesCount, loadingFilesCount, snippetCount, activeFileName, }: FullDiffLoadingBannerProps): React.ReactElement => { const title = loadingFilesCount === 1 ? 'Preparing Full Diff' : `Preparing ${loadingFilesCount} Full Diffs`; const subtitle = loadingFilesCount === 1 ? activeFileName ? `Finalizing the exact editor diff for ${activeFileName}.` : 'Finalizing the exact editor diff for the current file.' : 'Resolving exact before/after baselines for the files currently loading.'; const showFileProgress = totalFilesCount > 1; const progressPercent = totalFilesCount > 0 ? Math.max(0, Math.min(100, (readyFilesCount / totalFilesCount) * 100)) : 0; return (
{title} {activeFileName ? ( {activeFileName} ) : null}

{subtitle}

{snippetCount} snippet{snippetCount === 1 ? '' : 's'} ready Editor view loading {loadingFilesCount} file{loadingFilesCount === 1 ? '' : 's'} in progress {showFileProgress ? ( {readyFilesCount}/{totalFilesCount} files ready ) : null}

{showFileProgress ? `${readyFilesCount} ready, ${loadingFilesCount} still loading. Snippet previews stay visible below while the remaining baselines are reconstructed.` : 'Snippet previews stay visible below while the exact baseline is reconstructed.'}

); };