Abstract dialogs into a single directive.