How to create custom sub-menus using YaST?

Hey there! I am trying to create my own YaST menu with a list of options that the user can choose from. Once the user selects an option out of the list, I want to display the respective list of sub-menu’s for each menu-item.

I am able to display the first set of sub-menu’s using YaST, but since I have a chain of other consecutive sub-menu’s for each sub-menu item, I am looking for a solution that can help me achieve this. Is there a library/tool that can be leveraged for this use-case?