import {
    NotificationDataEmail,
    NotificationDataSystem,
    NotificationDataWap,
} from "./Notifications.Interface";

import { NotificationsWhatsappBotAdapter } from "./Notifications.Adapter.Bot";
import { NotificationsSystemAdapter } from "./Notifications.Adapter.System";
import { NotificationsDonWebAdapter } from "./Notifications.Adapter.donweb";

class NotificationsMngr {
    //notificationsNodeMailer: NotificationsNodemailerAdapter;
    notificationsDonWeb: NotificationsDonWebAdapter;
    notificationsBot: NotificationsWhatsappBotAdapter;
    notificationsSystem: NotificationsSystemAdapter;
    constructor() {
        //this.notificationsNodeMailer = new NotificationsNodemailerAdapter();
        this.notificationsDonWeb = new NotificationsDonWebAdapter();
        this.notificationsBot = new NotificationsWhatsappBotAdapter();
        this.notificationsSystem = new NotificationsSystemAdapter();
    }

    async sendEmail(data: NotificationDataEmail): Promise<void> {
        //await this.notificationsNodeMailer.send(data);
        await this.notificationsDonWeb.send(data);
    }

    async sendWap(data: NotificationDataWap): Promise<void> {
        await this.notificationsBot.send(data);
    }

    async sendSystemNotification(data: NotificationDataSystem): Promise<void> {
        await this.notificationsSystem.send(data);
    }
}

export const NotificationsManager = new NotificationsMngr();
