Thanks for your message.
Unfortunately, developers can’t build custom actions with custom UI like Shortcuts’ Menu action, we’re limited to parametrised actions (at the moment).
There isn’t an option to embed base64 in the action itself at the moment, but I’ll look at adding it. That’s actually the first request I’ve had for it and it makes sense as a feature.
If I was making a menu that way I’d probably create a dictionary with the key being the title of the menu item and then a nested dictionary containing the base64. I’d then decode the icon in a repeat action so you only have one ‘Create Menu Item’ action - a similar format to this example shortcut.
I agree building the if statements are tedious and a switch case ability would be so much better. I’m not quite sure if I’d have the tools to fix the if statement problem - anything I could build would still require a load of if statements as far as I can imagine. If I built a menu builder outside of shortcuts that generated a shortcut with the menus in, it wouldn’t be embedded into the source shortcut but would be a separate one and then it gets a bit messy.
The menus are definitely slower than showing a normal menu but 4 seconds seems slower than I’d expect. What size are the images? For optimum speed they should be around 123px (that’s what the Create Menu Item resizes them to automatically). I’ve knocked a couple of steps where I can out in an upcoming version so it should be slightly quicker.
The tool is really designed to make dynamic menu creation much easier (i.e images from URLs returned from an API as menu icons). If your menu isn’t dynamic and you’re concerned about speed, one tip I’d suggest is that you use the tool to prebuild your menu as a VCF card (since that’s what it’s doing in the backend anyway). You can grab the raw VCF card from the menu tool like this, that way you don’t have to create it dynamically every time the shortcut is run.
Hope that helps!