refactor: extract showConfirmationDialog helper