Two-step Dialog / Block UI


I’ve been developing Theia extension and I’ve come across an issue that someone might be able to help me with. I need to implement ‘two-step dialog’ meaning first part should be confirmation about the action, and after confirmation I need to wait for action to finish before doing anything else on IDE. Alternatively, I could use regular ConfirmDialog and block Theia UI whilst action is running [if possible]. Can you give me any advices on how could I resolve aforementioned problem?