Is it correct that Popup component does not have a "beforeClose" event?

I was just checking and I did not find a “beforeClose” or “beforeOpen” event for the popup? One might consider using it to call event.detail.prevent thus preventing the popup closing with unsaved user inputs.

Any advice on how to implement that?
(Apart from doing it manually by calling a custom function which does the checking and (maybe) closes depending on a state. This would mean never using “.popup-close” as it simply closes it without me having control over it.)