package routes

import (
	"nearle/facade"

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

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

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

	orders.Get("tenant/getorders", f.OrderController.GetOrders)
	orders.Get("partner/getorders", f.OrderController.GetOrders)
	orders.Get("customer/getorders", f.OrderController.GetOrders)
	orders.Get("user/getorders", f.OrderController.GetOrders)
	orders.Get("admin/getorders", f.OrderController.GetOrders)
	orders.Get("/getorders", f.OrderController.GetOrders)
	orders.Get("/getordersummary", f.OrderController.GetOrderSummary)
	orders.Get("/getlocationsummary", f.OrderController.GetlocationOrderSummary)
	orders.Get("/getorderinsight", f.OrderController.GetOrderInsights)
	orders.Get("/getrevenuesummary", f.OrderController.GetRevenueSummary)
	orders.Get("/gettimeseries", f.OrderController.GetTimeSeries)
	orders.Get("/getorderdetails", f.OrderController.GetOrderDetails)
	orders.Put("/updateorder", f.OrderController.UpdateOrder)
	orders.Post("/createorder", f.OrderController.CreateOrderv3)
	orders.Post("/uploadofflinesales", f.OrderController.UploadOfflineSales)

	reports := api.Group("/v1/web/reports")
	reports.Get("/sales-summary", f.OrderController.GetSalesSummary)

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

	orders.Post("/createorder", f.OrderController.CreateOrderv3)
	orders.Get("/getcustomerorders", f.OrderController.GetCustomerOrders)
	orders.Get("tenant/getorders", f.OrderController.GetOrders)
	orders.Put("/updateorder", f.OrderController.UpdateOrder)
	orders.Get("/getorderdetails", f.OrderController.GetOrderDetails)

}
