using ProjectPatientAccounting.Repositories.Implementations;
using ProjectPatientAccounting.Repositories;
using Unity;

namespace ProjectPatientAccounting;

internal static class Program
{
    /// <summary>
    ///  The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
        // To customize application configuration such as set high DPI settings or default font,
        // see https://aka.ms/applicationconfiguration.
        ApplicationConfiguration.Initialize();
        Application.Run(CreateContainer().Resolve<FormPolyclinic>());
    }

    private static IUnityContainer CreateContainer()
    {
        var container = new UnityContainer();

        container.RegisterType<IDoctorRepository, DoctorRepository>();
        container.RegisterType<IMedicamentRepository, MedicamentRepository>();
        container.RegisterType<IPatientDiagnosisRepository, PatientDiagnosisRepository>();
        container.RegisterType<IPatientRepository, PatientRepository>();
        container.RegisterType<IReceptionRepository, ReceptionRepository>();

        return container;
    }
}