using IntegryApiClient.Blazor; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using MudBlazor.Services; using salesbook.Shared.Components; using salesbook.Shared.Core.Interface; using salesbook.Shared.Core.Interface.IntegryApi; using salesbook.Shared.Core.Interface.System.Network; using salesbook.Shared.Core.Services; using salesbook.Web.Core.Services; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.Services.AddMudServices(); builder.Services.AddAuthorizationCore(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(provider => provider.GetRequiredService()); const string appToken = "f0484398-1f8b-42f5-ab79-5282c164e1d8"; builder.Services.UseIntegry(appToken: appToken, useLoginAzienda: true); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); builder.Services.AddScoped(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); var host = builder.Build(); await host.RunAsync();