We could just pass the click handlers to the warning, but there's some common functionality (managing the notification bar) that should happen in any case. So the actual click handler takes care of that, and delegates to `primaryClick` and `secondaryClick` for view-specific things. The `if(secondaryClick)` is present because there's not necessarily any view-specific code to run on cancel, so it's an optional parameter.