package configChecklists

import (
	"github.com/go-playground/validator/v10"
	"github.com/gofiber/fiber/v2"
	"gorm.io/gorm"

	rConfigChecklist "gitlab.com/mbugroup/lti-api.git/internal/modules/master/config-checklists/repositories"
	sConfigChecklist "gitlab.com/mbugroup/lti-api.git/internal/modules/master/config-checklists/services"

	rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
	sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
)

type ConfigChecklistModule struct{}

func (ConfigChecklistModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	configChecklistRepo := rConfigChecklist.NewConfigChecklistRepository(db)
	userRepo := rUser.NewUserRepository(db)

	configChecklistService := sConfigChecklist.NewConfigChecklistService(configChecklistRepo, validate)
	userService := sUser.NewUserService(userRepo, validate)

	ConfigChecklistRoutes(router, userService, configChecklistService)
}
