google search – How to correctly set up multi-language websites in NextJs for SEO? (avoid duplicate content)

I will have 5 websites, so 5 different domains

Each of them will be translated in all the other languages using subfolders system offered by Next.

- example.lt
- example.lt/en 
- example.lt/lv 
- example.lt/et 
- example.lt/ru

- example.com
- example.com/lt
- example.com/lv
- example.com/et
- example.com/ru

and so on for other domains...

and same for all the other domains.

When opening “example.lt/en” what should be the canonical URL? Should it be “example.com” which is in english? Or should it be “example.lt/en”?

So my question is how to correctly set canonical URLs and correctly use the “hreflang” property in order to avoid duplicate content in this case?

Will “example.lt/lv” and “example.com/lv” be considered as duplicate content, since they will have the same exact content? If yes, how to avoid that?