Hi yes it's possible. I've got something similar to that working but in a vertical menu. What I did was the following -
Each item in the top-level menu has to be it's own component. Each component will include the mega-menu.
You have to make each component have a default state and a hover state. In the default state, you have to hide the mega menu by using the eye icon on the layer. Then in the hover state, you show the layer.


I've done this by using the hover state, but you can also do it with other states. For example if you wanted the user to click on the menu to open it rather than hovering over it.
Hope that helps.