Two document types in SwiftUI?

Documentation of DocumentGroup says:

Your app can support multiple document types by adding additional document group scenes:

The example has an editor and a viewer, but I need to have two editors. Creating two different DocumentGroup elements seems to work, but then there's only one New Document menu item, which targets the first DocumentGroup.

Is there a way to allow the user to choose which document type to create?

It looks like the answer is no.

The second DocumentGroup is necessary for opening a file of the second type, but I haven't found a way to make SwiftUI create a document of that type. Using .handlesExternalEvents doesn't seem to help, as it seems to want to open a window defined by a WindowGroup rather than a DocumentGroup.

The best idea I've come up with is to create a temporary file and then push the URL for that to openURL, but that leaves the user with a file which they don't actually need, and doesn't replicate the experience of a new document.

This was the best answer that I found: https://stackoverflow.com/a/71978849/12299030

Two document types in SwiftUI?
 
 
Q