package routes

import (
	"nearle/facade"

	"github.com/gofiber/fiber/v2"
)

func RegisterUtilsRoutes(api fiber.Router, f *facade.Facade) {

	utils := api.Group("/v1/web/utils")

	utils.Get("/getapptypes", f.UtilsController.GetAppTypes)
	// Commented out since the initial commit, which meant every rider push the
	// admin console has ever sent returned 404 — riders were assigned deliveries
	// and never told. The handler, the FcmNotification model, the Firebase
	// service account and the Dockerfile COPY that puts it in the image were all
	// already in place; only the route was missing.
	utils.Post("/notifyuser", f.UtilsController.NotifyUser)
	utils.Get("/getsubcategories", f.UtilsController.GetSubcategories)
	utils.Get("/getapplocations", f.UtilsController.GetApplocations)
	utils.Get("/getappcategories", f.UtilsController.GetAppCategory)

	utils = api.Group("/v1/mob/utils")

	utils.Get("/getapplocationconfig", f.UtilsController.GetApplocationConfig)
	// utils.Post("/notifyadmin", f.UtilsController.NotifyAdmin)
	utils.Get("/getapplocations", f.UtilsController.GetApplocations)
	utils.Get("/getapptypes", f.UtilsController.GetAppTypes)
	utils.Get("/getappconfig", f.UtilsController.GetAppConfig)
	utils.Get("/getsubcategories", f.UtilsController.GetSubcategories)
	utils.Get("/getappcategories", f.UtilsController.GetAppCategory)

}
