using Gready_Poang.CommandClasses;
using Gready_Poang.Core;
using Gready_Poang.Pages;

namespace Gready_Poang;

public class PageFactory : IPageFactory
{
    private readonly IServiceProvider _services;

    public PageFactory(IServiceProvider services)
    {
        _services = services;
    }

    public Page CreateRoundPage()
    {
        var vm = _services.GetRequiredService<RoundRunningViewModelCommands>();
        var splashVm = _services.GetRequiredService<SplashViewModelCommands>();
        return new RoundRunningPage(vm, splashVm);
    }

    //public Page CreateStatsPage()
    //{
    //    //var vm = _services.GetRequiredService<StatsViewModel>();
    //    //var splashVm = _services.GetRequiredService<SplashViewModelCommands>();
    //    //var view = new StatsView { BindingContext = vm };
    //    //return new StatsPage(view, splashVm);
    //}
}
