How can I create multiple instances of the same widget view?

I have a basic widget called “doc-viewer” that is designed to show different types of documentation on the right side. I would like to have multiple instances of this widget based on some kind of run-time configuration (based on user session), like so:

{
    doc-viewer-widgets: [
        {
            "id": "activity-guide",
            "icon": "activity-guide-icon",
            "url": "https://example.com/activity-guide/beginner"
        }, 
        {
            "id": "language-reference-guides",
            "icon": "reference-guides-icon",
            "url": "https://example.com/reference-guides"
        }
    ]
}

Then I would need a command registered for each instance of the widget to show it.

I’m starting with the generator-theia-extension widget example, but I’m not sure how to write the ViewContribution class or the DI container so that it creates the widgets based on the config. Any suggestions on what approach I should take?