const messages = require('./messages');

// base api/handlers già creati in precedenza
const { sendMessage, sendPhoto } = require('./api');
const { sendToAdmins } = require('./handlers/adminHandler');
const { notifyUser, sendUserPhoto } = require('./handlers/userHandler');
const { sendNotification } = require('./handlers/notificationHandler');
const { reportError } = require('./handlers/errorHandler');

// NUOVI HANDLER aggiunti ora
const {
  sendMsgTelegram,
  sendMsgTelegramByIdTelegram,
  sendPhotoTelegram,
} = require('./handlers/directHandler');

const {
  sendMsgTelegramToTheAdminAllSites,
  sendMsgTelegramByIdApp,
  sendMsgTelegramToTheManagers,
  sendMsgTelegramToTheAdmin,
  sendMsgTelegramToTheGroup,
} = require('./handlers/multiAppHandler');

const {
  notifyToTelegram,
  askConfirmationUser,
  sendNotifToAdmin,
  sendNotifToManager,
  sendNotifToAdminOrManager,
  phase,
} = require('./handlers/phaseHandler');

module.exports = {
  // messaggi/template
  messages,
  phase,

  // API raw
  sendMessage,
  sendPhoto,

  // generico
  sendToAdmins,
  notifyUser,
  sendUserPhoto,
  sendNotification,
  reportError,

  // EQUIVALENTI del vecchio file
  sendMsgTelegram,                   // (user, text)
  sendMsgTelegramByIdTelegram,       // (telegramId, text)
  sendPhotoTelegram,                 // (chatIdOrUser, photoUrl, caption)

  sendMsgTelegramToTheAdminAllSites, // (text, alsoGroups?)
  sendMsgTelegramByIdApp,            // (idapp, text)
  sendMsgTelegramToTheManagers,      // (idapp, text)
  sendMsgTelegramToTheAdmin,         // (idapp, text)
  sendMsgTelegramToTheGroup,         // (chatId, text)

  notifyToTelegram,                  // (phase, locals)
  askConfirmationUser,               // (idapp, phase, user)
  sendNotifToAdmin,                  // (idapp, title, body)
  sendNotifToManager,                // (idapp, title, body)
  sendNotifToAdminOrManager,         // (idapp, title, body, preferManagers?)
};
