// using IgniteUI.Blazor.Controls; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Logging; using Microsoft.JSInterop; using OI.Metrology.View.Models; namespace OI.Metrology.View; public partial class AwaitingDisposition { // protected IgbIcon? OpenIconRef { get; set; } // protected IgbIcon? RefreshIconRef { get; set; } [Inject] protected IJSRuntime? JSRuntime { get; set; } [Inject] protected HttpClient? HttpClient { get; set; } [Inject] protected AppSettings? AppSettings { get; set; } [Inject] protected ILogger? Logger { get; set; } protected override Task OnAfterRenderAsync(bool firstRender) { // if (firstRender && OpenIconRef is not null) // { // const string svg = "Jump Down IconA picture showing a bent arrow pointing down towards a line."; // _ = OpenIconRef.EnsureReady().ContinueWith(new Action((e) => // OpenIconRef.RegisterIconFromTextAsync("jump-down", svg, "material"))); // } // if (firstRender && RefreshIconRef is not null) // { // const string svg = "System Update IconA picture depicting a computer screen with a reload symbol in the middle."; // _ = RefreshIconRef.EnsureReady().ContinueWith(new Action((e) => // RefreshIconRef.RegisterIconFromTextAsync("system-update", svg, "material"))); // } if (firstRender) { if (JSRuntime is null) throw new NullReferenceException(nameof(JSRuntime)); if (AppSettings is null) throw new NullReferenceException(nameof(AppSettings)); return JSRuntime.InvokeVoidAsync("initAwaitingDisposition", AppSettings.ApiUrl).AsTask(); } return Task.CompletedTask; } }