/** * EDUrocks Notification System * Toast notifications for save sync status, achievements, etc. */ (function() { 'use strict'; const NotificationSystem = { container: null, notifications: [], maxNotifications: 3, init: function() { // Create notification container this.container = document.createElement('div'); this.container.id = 'edurocks-notifications'; this.container.style.cssText = ` position: fixed; top: 20px; right: 20px; z-index: 999999; pointer-events: none; `; document.body.appendChild(this.container); console.log('[Notifications] System initialized'); }, show: function(options) { const { type = 'info', // 'success', 'error', 'warning', 'info', 'achievement' title = 'Notification', message = '', duration = 4000, icon = null } = options; // Remove oldest if too many if (this.notifications.length >= this.maxNotifications) { this.notifications[0].remove(); } const notification = document.createElement('div'); notification.className = `edurocks-notification edurocks-notification-${type}`; const iconMap = { success: '✓', error: '✕', warning: '⚠', info: 'ℹ', achievement: '🏆' }; const displayIcon = icon || iconMap[type] || iconMap.info; notification.innerHTML = `