package inventory

import (
	"gitlab.com/mbugroup/lti-api.git/internal/modules"

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

	adjustments "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/adjustments"
	productStocks "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/product-stocks"
	productWarehouses "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/product-warehouses"
	transfers "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/transfers"
	// MODULE IMPORTS
)

func RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	group := router.Group("/inventory")

	allModules := []modules.Module{
		productWarehouses.ProductWarehouseModule{},

		adjustments.AdjustmentModule{},
		transfers.TransferModule{},
		productStocks.ProductStockModule{},
		// MODULE REGISTRY
	}

	for _, m := range allModules {
		m.RegisterRoutes(group, db, validate)
	}
}
