import { useState } from 'react'; import { Icon } from '../shared/Icon'; import { PATHS } from '../../data/paths'; const CATEGORY_COLORS: Record = { success: '#22c55e', 'rider-cancel': '#ef4444', 'driver-cancel': '#f97316', timeout: '#eab308', ops: '#8b5cf6', 'active-cancel': '#ec4899', }; export function FlowPathsChecklistSection() { const [checked, setChecked] = useState>(new Set()); const toggle = (id: number) => { setChecked((prev) => { const next = new Set(prev); if (next.has(id)) next.delete(id); else next.add(id); return next; }); }; const total = PATHS.length; const done = checked.size; const pct = total > 0 ? Math.round((done / total) * 100) : 0; return (
Verification Progress {done}/{total} ({pct}%)
{PATHS.map((path) => { const isChecked = checked.has(path.id); const catColor = CATEGORY_COLORS[path.category] || '#64748b'; return ( ); })}
); }