// components/progress.js
// Visual chart of student progress
window.renderProgress = function() {
const content = document.getElementById('content');
const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
const today = new Date().getDay(); // 0 = Sun, 1 = Mon...
const adjustedToday = today === 0 ? 6 : today - 1; // Make Mon = 0
content.innerHTML = `
📈 Your Progress
ðŸ§
Concepts Mastered
${state.conceptsCompleted.length}
of 5 total
🔥
Current Streak
${state.streak}
days strong!
${getStreakMessage()}
📊
Weekly Goal
${state.weekProgress}%
This Week's Activity
${days.map((day, idx) => `
${day}
${idx < adjustedToday ? '✓' : (idx === adjustedToday ? '•' : '')}
`).join('')}
${getWeeklyMessage()}
💡 Insights
Strongest Area: Urdhva-Tiryak multiplication
Focus Next: Base method (Nikhilam)
Recent Win: Solved 67 × 38 in under 10 seconds!
`;
if (window.lucide) lucide.createIcons();
};
function getStreakMessage() {
if (state.streak < 2) return "Start your streak today! 🔥";
if (state.streak < 7) return "Building momentum! 💪";
return "Amazing consistency! 🌟";
}
function getWeeklyMessage() {
if (state.weekProgress < 30) return "Start gentle — just 5 minutes today!";
if (state.weekProgress < 70) return "You're halfway there! Keep going! 🚀";
return "Almost at your weekly goal! Finish strong! 💪";
}