export enum NotificationType {
  TASK_ASSIGNED = 'task_assigned',
  TASK_STATUS_CHANGED = 'task_status_changed',
  SUBMISSION_REVIEWED = 'submission_reviewed',
  WORK_SUBMITTED = 'work_submitted',
  DEADLINE_APPROACHING = 'deadline_approaching',
  PROJECT_UPDATE = 'project_update',
  COMMENT_ADDED = 'comment_added'
}

export enum NotificationPriority {
  LOW = 'low',
  NORMAL = 'normal',
  HIGH = 'high',
  URGENT = 'urgent'
}

export interface Notification {
  id: number
  user_id: number
  type: NotificationType
  priority: NotificationPriority
  title: string
  message: string
  read: boolean
  project_id?: number
  task_id?: number
  submission_id?: number
  email_sent: boolean
  email_sent_at?: string
  created_at: string
  read_at?: string
}

export interface NotificationPreferences {
  id: number
  user_id: number
  
  // Email preferences
  email_enabled: boolean
  email_task_assigned: boolean
  email_task_status_changed: boolean
  email_submission_reviewed: boolean
  email_work_submitted: boolean
  email_deadline_approaching: boolean
  email_project_update: boolean
  email_comment_added: boolean
  
  // In-app preferences
  inapp_enabled: boolean
  inapp_task_assigned: boolean
  inapp_task_status_changed: boolean
  inapp_submission_reviewed: boolean
  inapp_work_submitted: boolean
  inapp_deadline_approaching: boolean
  inapp_project_update: boolean
  inapp_comment_added: boolean
  
  // Digest settings
  email_digest_enabled: boolean
  email_digest_frequency: string
  
  created_at: string
  updated_at: string
}

export interface NotificationStats {
  total: number
  unread: number
  by_type: Record<string, number>
}
