package notifications

import (
	messaging "github.com/tech/sendico/pkg/messaging/envelope"
	tinternal "github.com/tech/sendico/pkg/messaging/internal/notifications/telegram"
	np "github.com/tech/sendico/pkg/messaging/notifications/processor"
	ch "github.com/tech/sendico/pkg/messaging/notifications/telegram/handler"
	"github.com/tech/sendico/pkg/mlogger"
	"github.com/tech/sendico/pkg/model"
)

func TelegramReaction(sender string, request *model.TelegramReactionRequest) messaging.Envelope {
	return tinternal.NewTelegramReactionEnvelope(sender, request)
}

func TelegramText(sender string, request *model.TelegramTextRequest) messaging.Envelope {
	return tinternal.NewTelegramTextEnvelope(sender, request)
}

func TelegramUpdate(sender string, update *model.TelegramWebhookUpdate) messaging.Envelope {
	return tinternal.NewTelegramUpdateEnvelope(sender, update)
}

func NewTelegramReactionProcessor(logger mlogger.Logger, handler ch.TelegramReactionHandler) np.EnvelopeProcessor {
	return tinternal.NewTelegramReactionProcessor(logger, handler)
}

func NewTelegramTextProcessor(logger mlogger.Logger, handler ch.TelegramTextHandler) np.EnvelopeProcessor {
	return tinternal.NewTelegramTextProcessor(logger, handler)
}

func NewTelegramUpdateProcessor(logger mlogger.Logger, handler ch.TelegramUpdateHandler) np.EnvelopeProcessor {
	return tinternal.NewTelegramUpdateProcessor(logger, handler)
}
