package approvals

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

	commonRepo "gitlab.com/mbugroup/lti-api.git/internal/common/repository"
	commonSvc "gitlab.com/mbugroup/lti-api.git/internal/common/service"

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

type ApprovalModule struct{}

func (ApprovalModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	approvalRepo := commonRepo.NewApprovalRepository(db)
	userRepo := rUser.NewUserRepository(db)

	approvalService := commonSvc.NewApprovalService(approvalRepo)
	userService := sUser.NewUserService(userRepo, validate)

	ApprovalRoutes(router, userService, approvalService)
}
