function suggestedCategoryForFocus(mode) { const fromPlan = (appState.actionPlan?.actions || []).find(a => { if (!a || !a.category || !CATS[a.category]) return false; if (mode === 'expired') return a.action === 'replace_expired'; if (mode === 'rejected') return a.action === 'replace_rejected'; if (mode === 'expiring_30') return a.action === 'renew_soon'; if (mode === 'pending') return a.action === 'follow_up_verification'; return a.action === 'upload_document'; }); if (fromPlan && fromPlan.category) return fromPlan.category; if (mode === 'expired' || mode === 'rejected' || mode === 'pending') return 'license'; if (mode === 'expiring_30') return 'medical'; return 'other'; } const focusSuggestionCat = focusMode ? suggestedCategoryForFocus(focusMode) : null;