using data.RemoteData.RemoteDataBase;
using data.Repository;
using domain.UseCase;
using ui;
using Microsoft.Extensions.DependencyInjection;
using ui.ui;

IServiceCollection services = new ServiceCollection();

services
    .AddDbContext<RemoteDatabaseContext>()
    .AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
    .AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
    .AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
    .AddSingleton<UserUseCase>()
    .AddSingleton<GroupUseCase>()
    .AddSingleton<UseCaseGeneratePresence>()
    .AddSingleton<GroupConsoleUI>()
    .AddSingleton<PresenceConsole>()
    .AddSingleton<MainMenuUI>();  
    

var serviceProvider = services.BuildServiceProvider();
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
mainMenuUI.DisplayMenu();