How can I show/hide pop up UI elements based on the bool value of another?

So I have this pop-up UI like any other object primitive has, however There’s a bool for Lug Nuts, and I’d like the 4 input fields below it to be hidden while it’s false, and shown when it’s true. How do I do that? Code here on GitHub, it’s in the generators.py file.

The code for all the menu properties start on line 980
The lugs bool property is on line 1059
I want to hide/show the lugs_num, lug_rot, lug_spin, and lug_span input fields

If you define a draw(self, context) method in the operator, then you can provide a custom way to draw the undo panel. You will have to draw all the properties yourself, but you’ll have full control over how it’s drawn.