A big refactoring was needed
Example how to show a confirm dialog before exiting an application.
cargo run -p confirm_exit