package routes

import (
	"nearle/facade"

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

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

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

	products.Get("/getproductsubcategories", f.ProductController.GetProductSubCategory)
	products.Get("/getproductscount", f.ProductController.GetProductCount)
	products.Get("/getproductcategories", f.ProductController.GetProductCategory)
	products.Get("/getproductvariants", f.ProductController.GetProductVariants)
	products.Get("/getcatalougeproducts", f.ProductController.GetCatalougeProducts)
	products.Get("/getproductstocks", f.ProductController.GetProductStocks)
	products.Post("/createproductstock", f.ProductController.CreateProductStock)
	products.Post("/create", f.ProductController.CreateProduct)
	products.Put("/update", f.ProductController.UpdateProduct)
	products.Delete("/delete", f.ProductController.DeleteProduct)
	products.Get("/getstockstatement", f.ProductController.GetStockStatement)
	products.Get("/getlocationproducts", f.ProductController.GetLocationProducts)
	products.Get("/getlocationproductsummary", f.ProductController.GetLocationProductSummary)
	products.Get("/getsaletemplate", f.ProductController.GetSaleTemplate)
	products.Get("/getallproducts", f.ProductController.GetAllProducts)
	products.Put("/updateproductlocation", f.ProductController.UpdateProductLocation)
	products.Post("/createproductlocation", f.ProductController.CreateProductLocation)
	products.Post("/importcatalogueproduct", f.ProductController.ImportCatalogueProduct)
	products.Get("/getimportedcatalogueproducts", f.ProductController.GetImportedCatalogueProducts)
	products.Get("/gettenantcategories", f.ProductController.GetTenantCategories)
	products.Delete("/deleteproductlocation", f.ProductController.DeleteProductLocation)
	products.Post("/createproductvariant", f.ProductController.CreateProductVariant)
	
	products.Post("/createstockrequest", f.StockRequestController.CreateStockRequest)
	products.Get("/getstockrequests", f.StockRequestController.GetStockRequests)
	products.Put("/updatestockrequest", f.StockRequestController.UpdateStockRequest)

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

	products.Get("/getproductbyvariant", f.ProductController.GetProductByVariant)
	products.Get("/getproductsubcategories", f.ProductController.GetProductSubCategory)
	products.Get("/getallproducts", f.ProductController.GetAllProducts)
	products.Get("/getproductsbysubcategory", f.ProductController.GetProductsBySubcategory)
	products.Put("/update", f.ProductController.UpdateProduct)
	products.Get("/getlocationproducts", f.ProductController.GetLocationProducts)
	products.Put("/updateproductlocation", f.ProductController.UpdateProductLocation)
	products.Post("/importcatalogueproduct", f.ProductController.ImportCatalogueProduct)
	products.Get("/getimportedcatalogueproducts", f.ProductController.GetImportedCatalogueProducts)
	products.Get("/gettenantcategories", f.ProductController.GetTenantCategories)

}
