Maybe I’m misunderstanding the problem but it seems like you could create 2 datasets as custom properties on your root container.
Whenever the user changes the items in the popup, you just refresh the datasets.
Then in you configureEditor event, you could read the values in the appropriate dataset and return those items as options.