using BlazorWebAssembly; using BlazorWebAssembly.Providers; using BlazorWebAssembly.Services; using Blazored.LocalStorage; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); // Add HttpClient with Backend address builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://yuruyuruu-librarymanagement.hf.space/") }); // Add Blazored LocalStorage builder.Services.AddBlazoredLocalStorage(); // Add Authorization Core builder.Services.AddAuthorizationCore(); // Register Custom AuthStateProvider builder.Services.AddScoped(); builder.Services.AddScoped(sp => sp.GetRequiredService()); // Register AuthService builder.Services.AddScoped(); // Register ThemeService builder.Services.AddScoped(); // Register LibraryApiClient builder.Services.AddScoped(); // Register WishlistService builder.Services.AddScoped(); // Register NotificationStateService builder.Services.AddScoped(); await builder.Build().RunAsync();