Yii2 Customize Url Manager for multiple themes

Hello, i want to customize to add Url Manager for multiple themes.

Like, i have to theme: blog, shoppingcard… So now, with app run with theme blog, that Url for Blog will assign. Like shoppingcard theme, url manager for blog will assign.

So now how can i use some pattern for solve that problem. It simple by insert code in Controller. check theme active then add

UrL manager. So i want to add with a class. with theme 1 will load Url manager for theme1, theme2 will load url Manager for it.

thank.