using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using HushianWebApp;
using HushianWebApp.Services;
using HushianWebApp.Service;

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
string BaseAddress = builder.Configuration.GetSection("BaseAddress").Value;
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(BaseAddress) });
builder.Services.AddScoped<ILocalStorageService, LocalStorageService>();
builder.Services.AddScoped<BaseController>();
builder.Services.AddScoped<AuthService>();
builder.Services.AddScoped<VerificationService>();
builder.Services.AddScoped<UserService>();
builder.Services.AddScoped<CompanyService>();
builder.Services.AddScoped<GroupService>();
builder.Services.AddScoped<PromptService>();
builder.Services.AddScoped<ConversationService>();
builder.Services.AddScoped<ChatService>();
builder.Services.AddBlazorBootstrap();
await builder.Build().RunAsync();
