I was building a custom widget a confirm dialog, the idea was to have a reusable dialog that I can hook in any other component to customize the content and react to the Ok/Cancel buttons, I wonder if there is a way to fire custom events from the widget so the editor can know about it and thus bind it in the consumer component like:
<confirm_dialog name="my_dialog"
title="Is this even possible?"
description="I want to call the event when the ok button gets pressed">
<event_cb callback="on_confirm_dialog_ok" trigger="confirm_dialog_ok" />
</confirm_dialog>