package messages

import (
	authmw "boostai-backend/internal/middleware"

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

func RegisterRoutes(app fiber.Router, auth *authmw.AuthMiddleware, h *Handler) {
	app.Get("/messages/recipients", h.ListRecipients)
	app.Get("/messages/threads", h.ListThreads)
	app.Get("/messages/threads/:threadId", h.GetThread)
	app.Post("/messages/threads", h.CreateThread)
	app.Patch("/messages/threads/:threadId", h.UpdateThread)
	app.Delete("/messages/threads/:threadId", h.DeleteThread)
	app.Post("/messages/threads/:threadId/messages", h.CreateThreadMessage)
	app.Patch("/messages/threads/:threadId/messages/:messageId", h.UpdateThreadMessage)
	app.Delete("/messages/threads/:threadId/messages/:messageId", h.DeleteThreadMessage)
	app.Patch("/messages/threads/:threadId/read", h.MarkThreadRead)
}
