package router

import (
	"bpmsapi/handler"
	"log"

	"github.com/gin-gonic/gin"
)

func InitCommonRouter(r *gin.RouterGroup) {
	userroute := r.Group("/common")
	userroute.GET("/verifyOTP", handler.NewAuthHandler("Authentication").VerifyOTPHandler)
	userroute.GET("/fetchStateList", handler.NewCommonHandler("Common").StateListHandler)
	userroute.GET("/fetchCityList", handler.NewCommonHandler("Common").CityListHandler)
	userroute.GET("/fetchApartmentList", handler.NewCommonHandler("Common").ApartmentListHandler)
	userroute.GET("/authenticateAdmin", handler.NewAuthHandler("Authentication").AuthenticateAdminHandler)
	userroute.GET("/authenticateCustomer", handler.NewAuthHandler("Authentication").AuthenticateCustomerHandler)
	userroute.GET("/getUser", handler.NewUserHandler("User").FetchUserHandler)
	userroute.GET("/fetchServices", handler.NewCommonHandler("Common").FetchServiceHandler)
	log.Println("Router configured")
}
