using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Components; using System.Net.Http; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Forms; using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web.Virtualization; using Microsoft.JSInterop; using MP.INVE; using MP.INVE.Shared; using MP.INVE.Components; using MP.INVE.Data; using MP.Data.DTO; using Blazored.LocalStorage; namespace MP.INVE.Components { public partial class NavMenuTerm { private bool collapseNavMenu = true; //public List? ElencoLink { get; set; } private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; private void ToggleNavMenu() { collapseNavMenu = !collapseNavMenu; } protected string cssScan = ""; protected string cssCanc = ""; protected string cssScanBack = ""; protected string cssCancBack = ""; protected string @cssCancScan = ""; protected override async Task OnInitializedAsync() { if (isScan) { cssCancScan = "bg-info"; cssScanBack = "background-color: rgba(255,255,255,0.7)"; cssScan = "fw-bold text-decoration-underline"; } else { cssCancScan = "bg-danger"; cssCancBack = "background-color: rgba(255,255,255,0.7)"; cssCanc = "fw-bold text-decoration-underline"; } // recupero elenco JQM //ElencoLink = await MDService.ElencoLink(); } protected bool showText { get; set; } = true; protected void ToggleCompress() { showText = !showText; EC_compressUpdated.InvokeAsync(showText); } protected async Task goBack() { if (NavigationManager.Uri.Contains("")) await JSRuntime.InvokeVoidAsync("history.go", -1); } protected string hideText { get => showText ? "" : "invisible"; } [Parameter] public EventCallback EC_compressUpdated { get; set; } [Parameter] public bool isScan { get; set; } = false; [Parameter] public string link { get; set; } = ""; [Inject] protected ILocalStorageService localStorage { get; set; } = null!; [Inject] protected NavigationManager NavigationManager { get; set; } = null!; [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; } }