package com.iqser.red.service.persistence.management.v1.processor.service.persistence;

import java.util.List;

import org.springframework.stereotype.Service;

import com.iqser.red.service.persistence.management.v1.processor.entity.notification.NotificationEntity;
import com.iqser.red.service.persistence.service.v1.api.shared.model.notification.EmailNotificationType;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
@RequiredArgsConstructor
@SuppressWarnings("PMD")
public class NotificationEmailService {

    public void sendNotificationEmail(String userId, EmailNotificationType emailNotificationType, List<NotificationEntity> notifications) {

        switch (emailNotificationType) {
            case DAILY:
                sendDailyEmail(userId, notifications);
            case DAILY_SUMMARY:
                sendDailySummaryEmail(userId, notifications);
            case WEEKLY_SUMMARY:
                sendWeeklySummaryEmail(userId, notifications);
        }

    }


    private void sendDailyEmail(String userId, List<NotificationEntity> notifications) {

        log.info("Should send daily notification email for {}", userId);
        // TODO
    }


    private void sendDailySummaryEmail(String userId, List<NotificationEntity> notifications) {

        log.info("Should send daily notification summary email for {}", userId);
        // TODO
    }


    private void sendWeeklySummaryEmail(String userId, List<NotificationEntity> notifications) {

        log.info("Should send weekly notification summary email for {}", userId);
        // TODO
    }

}
