How can I combine windowgroup and documentgroup in swiftui app

I want to use windowgroup at the same time in a swiftui app to display some extra information and be able to open documents via documentgroup. Ask how to achieve?

How can I combine windowgroup and documentgroup in swiftui app
 
 
Q