Please note this repo is still in its early stage.
Conditional navigation flow means going forward or backward to different flow steps based on different conditions. The usual approach is to predefine the flow steps and their dependencies. However, this isn't practical if we want to make it real-time and dynamic, meaning the condition would depend on changing inputs. As a result, we need a solution to achieve it.
We'll try to attack the problem by leveraging the algorithm: topological sort.
Every time we need to go forward or backward in the navigation flow, we'll check the dependency and rebuild the graph for the flow.