export type NotificationType = "deadline" | "chapter_unlock" | "result_release" | "announcement" | "assignment" | "exam" | "message" | "system";
export type NotificationChannel = "in_app" | "email" | "both";
export type ReminderFrequency = "once" | "daily" | "custom";

export interface Notification {
  id: number;
  user_id: number;
  title: string;
  message: string;
  type: NotificationType;
  action_url?: string;
  is_read: boolean;
  read_at?: string;
  channel: NotificationChannel;
  created_at: string;
}

export interface NotificationRule {
  id: number;
  name: string;
  event_type: string;
  days_before: number;
  frequency: ReminderFrequency;
  custom_intervals?: number[];
  channel: NotificationChannel;
  entity_id?: number;
  entity_name?: string;
  active: boolean;
}

export interface NotificationPreferences {
  email_enabled: boolean;
  assignment_alerts: boolean;
  exam_alerts: boolean;
  chapter_alerts: boolean;
  announcement_alerts: boolean;
  message_alerts: boolean;
}

export interface NotificationRuleCreateRequest {
  name: string;
  event_type: string;
  days_before: number;
  frequency: ReminderFrequency;
  custom_intervals?: number[];
  channel: NotificationChannel;
  entity_id?: number;
}
