package com.flightticket.service;

import com.flightticket.dto.notification.*;
import com.flightticket.model.enums.NotificationType;

import java.util.List;
import java.util.UUID;

public interface NotificationService {
    
    /**
     * Send a notification to a user
     * Creates in-app notification and queues email notification if enabled
     */
    void sendNotification(CreateNotificationRequest request);
    
    /**
     * Send an email notification
     * Queues the email for asynchronous delivery
     */
    void sendEmail(EmailNotificationRequest request);
    
    /**
     * Get all notifications for a user
     */
    List<NotificationResponse> getUserNotifications(UUID userId);
    
    /**
     * Get unread notifications for a user
     */
    List<NotificationResponse> getUnreadNotifications(UUID userId);
    
    /**
     * Get unread notification count for a user
     */
    long getUnreadCount(UUID userId);
    
    /**
     * Mark a notification as read
     */
    void markAsRead(UUID notificationId);
    
    /**
     * Mark all notifications as read for a user
     */
    void markAllAsRead(UUID userId);
    
    /**
     * Update notification preferences for a user
     */
    void updatePreferences(UUID userId, List<NotificationPreferenceRequest> preferences);
    
    /**
     * Get notification preferences for a user
     */
    List<NotificationPreferenceResponse> getPreferences(UUID userId);
    
    /**
     * Check if a user has enabled a specific notification channel
     */
    boolean isChannelEnabled(UUID userId, NotificationType type, String channel);
    
    /**
     * Send ticket issued notification
     */
    void sendTicketIssuedNotification(UUID userId, String ticketNumber, String pnr);
    
    /**
     * Send low balance notification
     */
    void sendLowBalanceNotification(UUID agencyId);
    
    /**
     * Send recharge approved notification
     */
    void sendRechargeApprovedNotification(UUID userId, String amount);
    
    /**
     * Send transaction failed notification
     */
    void sendTransactionFailedNotification(UUID userId, String errorMessage);
}
