export const ALERT_TYPES = {
  ACTIVITY_DUE_SOON: "activity_due_soon",
  ACTIVITY_OVERDUE: "activity_overdue",
  ATTENDANCE_COVERAGE_LOW: "attendance_coverage_low",
  DROPOUT_RISK_SUMMARY: "dropout_risk_summary",
} as const;

export type AlertType = (typeof ALERT_TYPES)[keyof typeof ALERT_TYPES];

export type AlertSeverity = "info" | "warning" | "critical";

export type AlertRuleDefaults = {
  severity: AlertSeverity;
  cooldownMinutes: number;
  smtpEnabled: boolean;
};

export const ALERT_RULE_DEFAULTS: Record<AlertType, AlertRuleDefaults> = {
  [ALERT_TYPES.ACTIVITY_DUE_SOON]: { severity: "info", cooldownMinutes: 24 * 60, smtpEnabled: true },
  [ALERT_TYPES.ACTIVITY_OVERDUE]: { severity: "critical", cooldownMinutes: 12 * 60, smtpEnabled: true },
  [ALERT_TYPES.ATTENDANCE_COVERAGE_LOW]: { severity: "warning", cooldownMinutes: 24 * 60, smtpEnabled: true },
  [ALERT_TYPES.DROPOUT_RISK_SUMMARY]: { severity: "critical", cooldownMinutes: 7 * 24 * 60, smtpEnabled: true },
};
