import type { NotificationChannel, NotificationType } from '../../domain/types/NotificationTypes';

export interface NotificationData {
  raceEventId?: string;
  sessionId?: string;
  leagueId?: string;
  position?: number | 'DNF';
  positionChange?: number;
  incidents?: number;
  provisionalRatingChange?: number;
  finalRatingChange?: number;
  hadPenaltiesApplied?: boolean;
  deadline?: Date;
  protestId?: string;
  [key: string]: unknown;
}

export interface NotificationAction {
  label: string;
  type: 'primary' | 'secondary' | 'danger';
  href?: string;
  actionId?: string;
}

export interface SendNotificationCommand {
  recipientId: string;
  type: NotificationType;
  title: string;
  body: string;
  channel: NotificationChannel;
  urgency: 'silent' | 'toast' | 'modal';
  data?: NotificationData;
  actionUrl?: string;
  actions?: NotificationAction[];
  requiresResponse?: boolean;
}

export interface NotificationService {
  sendNotification(command: SendNotificationCommand): Promise<void>;
}