Hi,
I’m new to scripting in Blender and I trying to create a Popup Dialog (not Modal) UI and I did find this example as a starting point.
https://github.com/martijnberger/blender/blob/master/doc/python_api/examples/bpy.types.Operator.4.py
But I’m struggling to find how to have panel that you can collapse as well as in the mockup image below?

any idea how I can achieve this?
cheers