package router

func registerConflictRoutes(cfg *Config) {
	e := cfg.Echo

	// JWT middleware for protected routes
	jwtMiddleware := createJWTMiddleware(cfg)

	protected := e.Group("/api", jwtMiddleware)

	// Conflict resolution routes
	conflicts := protected.Group("/conflicts")
	conflicts.GET("", cfg.ConflictHandler.ListConflicts)
	conflicts.GET("/:id", cfg.ConflictHandler.GetConflict)
	conflicts.POST("/:id/resolve", cfg.ConflictHandler.ResolveConflict)
	conflicts.DELETE("/:id", cfg.ConflictHandler.DeleteConflict)
	conflicts.POST("/dismiss-all", cfg.ConflictHandler.DismissAllResolved)
	conflicts.POST("/bulk-resolve", cfg.ConflictHandler.BulkResolveConflicts)
	conflicts.POST("/bulk-dismiss", cfg.ConflictHandler.BulkDismissConflicts)
}
