/** * EasyStream Notifications Widget * Real-time notification bell with dropdown */ class NotificationWidget { constructor(containerId = 'notification-widget') { this.container = document.getElementById(containerId); if (!this.container) { console.error('Notification container not found'); return; } this.unreadCount = 0; this.notifications = []; this.dropdownOpen = false; this.pollInterval = 30000; // Poll every 30 seconds this.pollTimer = null; this.init(); } init() { this.render(); this.attachEventListeners(); this.fetchNotifications(); this.startPolling(); } render() { this.container.innerHTML = `