/**
 * Utility functions for debugging notification system flow
 */

export function logNotificationCreation(type, userId, title) {
  console.log(`%c[Notification Created]`, 'color: #10b981; font-weight: bold;', {
    timestamp: new Date().toISOString(),
    type,
    userId,
    title
  });
}

export function logNotificationSubscription(status, details = null) {
  const color = status === 'SUBSCRIBED' ? '#3b82f6' : '#ef4444';
  console.log(`%c[Notification Subscription]`, `color: ${color}; font-weight: bold;`, {
    timestamp: new Date().toISOString(),
    status,
    details
  });
}

export function logNotificationUpdate(notification) {
  console.log(`%c[Notification Received]`, 'color: #8b5cf6; font-weight: bold;', {
    timestamp: new Date().toISOString(),
    id: notification.id,
    type: notification.type,
    title: notification.title
  });
}

export function logError(context, error) {
  console.error(`%c[Error: ${context}]`, 'color: #ef4444; font-weight: bold;', {
    timestamp: new Date().toISOString(),
    message: error.message,
    stack: error.stack,
    details: error
  });
}