using VeterinaryBusinessLogic.BusinessLogic;
using VeterinaryContracts.BusinessLogicContracts;
using VeterinaryContracts.StorageContracts;
using VeterinaryDatabaseImplement.Implements;
using Microsoft.OpenApi.Models;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddTransient<IDoctorStorage, DoctorStorage>();
builder.Services.AddTransient<IPetStorage, PetStorage>();
builder.Services.AddTransient<IDrugStorage, DrugStorage>();
builder.Services.AddTransient<IVisitStorage, VisitStorage>();
builder.Services.AddTransient<IOwnerStorage, OwnerStorage>();
builder.Services.AddTransient<IServiceStorage, ServiceStorage>();
builder.Services.AddTransient<IMedicationStorage, MedicationStorage>();
builder.Services.AddTransient<IPurchaseStorage, PurchaseStorage>();


builder.Services.AddTransient<IDoctorLogic, DoctorLogic>();
builder.Services.AddTransient<IPetLogic, PetLogic>();
builder.Services.AddTransient<IDrugLogic, DrugLogic>();
builder.Services.AddTransient<IVisitLogic, VisitLogic>();
builder.Services.AddTransient<IOwnerLogic, OwnerLogic>();
builder.Services.AddTransient<IServiceLogic, ServiceLogic>();
builder.Services.AddTransient<IMedicationLogic, MedicationLogic>();
builder.Services.AddTransient<IPurchaseLogic, PurchaseLogic>();

builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
	app.UseSwagger();
	app.UseSwaggerUI();
}

app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();
