import { ArrowRight, ArrowRightLeft, Layers3, Link2, Unlink, Waves, type LucideIcon, } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { cn } from '@/lib/utils'; interface HistorySyncLearningMapProps { isolatedCount: number; sharedStandardCount: number; deeperSharedCount: number; sharedGroups: string[]; legacyTargetCount: number; } type StageTone = 'isolated' | 'shared' | 'deeper'; function StageCard({ title, count, icon: Icon, tone, description, }: { title: string; count: number; icon: LucideIcon; tone: StageTone; description: string; }) { const toneClasses: Record = { isolated: { card: 'border-blue-300/60 bg-blue-50/40 dark:border-blue-900/40 dark:bg-blue-900/10', icon: 'text-blue-700 dark:text-blue-400', count: 'text-blue-700 dark:text-blue-400', }, shared: { card: 'border-emerald-300/60 bg-emerald-50/40 dark:border-emerald-900/40 dark:bg-emerald-900/10', icon: 'text-emerald-700 dark:text-emerald-400', count: 'text-emerald-700 dark:text-emerald-400', }, deeper: { card: 'border-indigo-300/60 bg-indigo-50/40 dark:border-indigo-900/40 dark:bg-indigo-900/10', icon: 'text-indigo-700 dark:text-indigo-400', count: 'text-indigo-700 dark:text-indigo-400', }, }; return (

{title}

{count}

{description}

); } export function HistorySyncLearningMap({ isolatedCount, sharedStandardCount, deeperSharedCount, sharedGroups, legacyTargetCount, }: HistorySyncLearningMapProps) { const groupsToShow = sharedGroups.length > 0 ? sharedGroups : ['default']; return (
How History Sync Works Learning Map
Accounts can move between modes at any time. Link/unlink is instant; Edit gives full control of group and continuity depth.

Mode Switch Actions

Link: Isolated -> Shared Unlink: Shared -> Isolated Edit: Group + Deeper

History Sync Group

Accounts in the same group share the same project context bucket. Group names are user-defined lanes, with default as fallback.

{groupsToShow.map((group) => ( {group} ))}
{legacyTargetCount > 0 && (
{legacyTargetCount} legacy account {legacyTargetCount > 1 ? 's still need' : ' still needs'} explicit confirmation. Use{' '} Confirm Legacy Policies in Action Center.
)}
); }