@using RBLNews.Shared.Services

@inject IFeedDataService feedDataService
<nav class="nav">
    <div class="container-fluid">
        <div class="top-row ps-3 navbar">
            <h4>RBL News auf einen Blick!</h4>
        </div>
        <div class="top-row ps-3">
            @if (FeedDataService.Feeds?.LastUpdate == null)
            {
                <text>...</text>
            }
            else
            {
                <text>Letzter Check: @FeedDataService.Feeds?.LastUpdate.ToString("dd.MM.yyyy HH:mm")</text> 
            }
        </div>
    </div>
</nav>
@*
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />

<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
    <nav class="flex-column">
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
            </NavLink>
        </div>
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="feeds">
                <span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
            </NavLink>
        </div>
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="weather">
                <span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
            </NavLink>
        </div>
    </nav>
</div>
 *@



@code {
    [Inject]
    private IFeedDataService FeedDataService { get; set; }

    protected override void OnInitialized()
    {
        FeedDataService.DataChanged = () => StateHasChanged();
    }

}