package initialize

import (
	"gitea.pena/PenaSide/heruvym/internal/controllers/other"
	"gitea.pena/PenaSide/heruvym/internal/controllers/tickets"
	"gitea.pena/PenaSide/hlog"
	"github.com/go-redis/redis/v8"
	"go.uber.org/zap"
	"gopkg.in/telebot.v3"
)

type ControllersDeps struct {
	Reps        *Repositories
	RedisClient *redis.Client
	Notifier    *telebot.Bot
	TgChatID    int64
	HLogger     hlog.Logger
	ZapLogger   *zap.Logger
}

type Controllers struct {
	Tickets *tickets.TicketController
	Other   *other.OtherController
}

func NewControllers(deps ControllersDeps) *Controllers {
	return &Controllers{
		Tickets: tickets.NewTicketController(tickets.Deps{
			Dal:       deps.Reps.Mongo,
			Notifier:  deps.Notifier,
			TgChatID:  deps.TgChatID,
			ZapLogger: deps.ZapLogger,
			HLogger:   deps.HLogger,
		}),
		Other: other.NewOtherController(other.Deps{
			Dal:         deps.Reps.Mongo,
			RedisClient: deps.RedisClient,
			BS:          deps.Reps.Minio,
			Notifier:    deps.Notifier,
			TgChatID:    deps.TgChatID,
		}),
	}
}
