@inherits LayoutComponentBase
@using System.Runtime.InteropServices.JavaScript

<!--  preloader start>
    <div id="tb-preloader">
        <div class="tb-preloader-wave"></div>
    </div>
    < preloader end -->


    <div class="wrapper">
<!--div class="page"-->
    

    <main>
        <!--div class="top-row px-4">
            <a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
        </div-->
        <Navbar/>
        <article class="content px-4">
            @Body
        </article>
    </main>
</div>

@code {

    [Inject]
    public IJSRuntime JSRuntime { get; set; }

    private IJSObjectReference _jsModule;

    /*protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        base.OnAfterRender(firstRender);

        if (firstRender)
        {
            _jsModule = await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/MissNationSharedUI/assets/exampleJsInterop.js");
            await _jsModule.InvokeVoidAsync("getMessage");
        }
    }*/

    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();
        _jsModule = await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/MissNationSharedUI/assets/exampleJsInterop.js");
        await _jsModule.InvokeVoidAsync("getMessage");
    }

}



