package systemsettings

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

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

type SystemSettingsModule struct{}

func (SystemSettingsModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	userRepo := rUser.NewUserRepository(db)
	userSvc := sUser.NewUserService(userRepo, validate)

	repo := repository.NewSystemSettingRepository(db)
	svc := service.NewSystemSettingService(repo)
	SystemSettingRoutes(router, userSvc, svc)
}
