How do I handle operators / dialog boxes to implement something similar to the "add preset" functionality in blender? I want to have a +/- buttons to add/remove presets and when the + button is clicked it should essentially invoke an operator to add the preset, but first it will have to pop up a dialog box to ask for the preset's name. How would these operators / dialog box work together so that the output of the dialog box entered in the preset name dialog box is then used to carry out adding the preset via the "add preset" operator? I looked at the blender presets.py code but it's rather dense and hard to understand so I need some hints.
Note: any links to posts/code that show the operators/dialog boxes interaction within an addon script are highly appreciated.