using Pixiview.UI.Theme;
using Xamarin.Forms;

namespace Pixiview.Utils
{
    public static class UIFactory
    {
        public static NavigationPage CreateNavigationPage(Page root)
        {
            var navigation = new NavigationPage(root);
            navigation.SetDynamicResource(NavigationPage.BarBackgroundColorProperty, ThemeBase.MainColor);
            navigation.SetDynamicResource(NavigationPage.BarTextColorProperty, ThemeBase.MainTextColor);
            navigation.SetDynamicResource(VisualElement.BackgroundColorProperty, ThemeBase.WindowColor);
            return navigation;
        }
    }
}
