How to create sitemap.xml for multilangual and multidomain site?

Hey everyone,

Looks like for my issue I need 2 separate sitemaps, for each domain.
Each one should have dynamically created routes, but the general issue is in creating 2 files. I’m using Next.JS 13.5, with an app router