using CommunityToolkit.Mvvm.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Prise.DependencyInjection;
using PSCHelpdesk.Services;
using PSCHelpdesk.Shared.Service;
using PSCHelpdesk.ViewModels;

namespace PSCHelpdesk;

class Startup
{
    public static void RegisterServices()
    {
        var menuService = new MenuService();

        var te = new ServiceCollection()
            .AddPrise()
            .AddSingleton<AppService>()
            .AddSingleton<IMenuService>(menuService)
            .AddSingleton<ITestService>(new TestService())
            .AddSingleton<PluginService>()
            .AddTransient<PluginListViewModel>();
            
            
        var ls = te.BuildServiceProvider();
        
        Ioc.Default.ConfigureServices(
            ls
        );
    }
}