File: Components_Cart_razor.g.cs
Project: src\playground\TestShop\MyFrontend\MyFrontend.csproj (MyFrontend)
#pragma checksum "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "b635732082d5d638d52e8d0123083a5aab2c52f1aa0f72d94e4bee8259b8f728"
// <auto-generated/>
#pragma warning disable 1591
namespace MyFrontend.Components
{
    #line default
    using global::System;
    using global::System.Collections.Generic;
    using global::System.Linq;
    using global::System.Threading.Tasks;
    using global::Microsoft.AspNetCore.Components;
#nullable restore
#line (1,2)-(1,23) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using System.Net.Http
 
#nullable disable
    ;
#nullable restore
#line (2,2)-(2,28) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using System.Net.Http.Json
 
#nullable disable
    ;
#nullable restore
#line (3,2)-(3,45) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using Microsoft.AspNetCore.Components.Forms
 
#nullable disable
    ;
#nullable restore
#line (4,2)-(4,47) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using Microsoft.AspNetCore.Components.Routing
 
#nullable disable
    ;
#nullable restore
#line (5,2)-(5,43) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using Microsoft.AspNetCore.Components.Web
 
#nullable disable
    ;
#nullable restore
#line (6,2)-(6,61) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using static Microsoft.AspNetCore.Components.Web.RenderMode
 
#nullable disable
    ;
#nullable restore
#line (7,2)-(7,58) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using Microsoft.AspNetCore.Components.Web.Virtualization
 
#nullable disable
    ;
#nullable restore
#line (8,2)-(8,27) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using Microsoft.JSInterop
 
#nullable disable
    ;
#nullable restore
#line (9,2)-(9,18) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using MyFrontend
 
#nullable disable
    ;
#nullable restore
#line (10,2)-(10,29) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using MyFrontend.Components
 
#nullable disable
    ;
#nullable restore
#line (11,2)-(11,36) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using MyFrontend.Components.Layout
 
#nullable disable
    ;
#nullable restore
#line (12,2)-(12,27) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using MyFrontend.Services
 
#nullable disable
    ;
#nullable restore
#line (13,2)-(13,28) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\_Imports.razor"
using BasketService.Models
 
#nullable disable
    ;
    #line default
    #line hidden
    #nullable restore
    public partial class Cart : global::Microsoft.AspNetCore.Components.ComponentBase
    #nullable disable
    {
        #pragma warning disable 1998
        protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "div");
            __builder.AddAttribute(1, "class", "justify-content-end");
#nullable restore
#line (5,1)-(5,5) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
    
 
#line default
#line hidden
#nullable disable
 
#nullable restore
#line (5,6)-(7,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
if (basketIsAvailable)
    {
 
#line default
#line hidden
#nullable disable
 
            __builder.OpenComponent<global::Microsoft.AspNetCore.Components.Forms.EditForm>(2);
            __builder.AddComponentParameter(3, nameof(global::Microsoft.AspNetCore.Components.Forms.EditForm.
#nullable restore
#line (7,19)-(7,24) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
Model
 
#line default
#line hidden
#nullable disable
            ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Object>(
#nullable restore
#line (7,26)-(7,30) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
this
 
#line default
#line hidden
#nullable disable
            ));
            __builder.AddComponentParameter(4, nameof(global::Microsoft.AspNetCore.Components.Forms.EditForm.
#nullable restore
#line (7,32)-(7,40) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
FormName
 
#line default
#line hidden
#nullable disable
            ), "checkout");
            __builder.AddComponentParameter(5, nameof(global::Microsoft.AspNetCore.Components.Forms.EditForm.
#nullable restore
#line (7,52)-(7,60) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
OnSubmit
 
#line default
#line hidden
#nullable disable
            ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::Microsoft.AspNetCore.Components.Forms.EditContext>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Forms.EditContext>(this, 
#nullable restore
#line (7,62)-(7,76) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
HandleCheckout
 
#line default
#line hidden
#nullable disable
            )));
            __builder.AddComponentParameter(6, "data-enhance", true);
            __builder.AddAttribute(7, "ChildContent", (global::Microsoft.AspNetCore.Components.RenderFragment<global::Microsoft.AspNetCore.Components.Forms.EditContext>)((context) => (__builder2) => {
                __builder2.OpenElement(8, "button");
                __builder2.AddAttribute(9, "type", "submit");
                __builder2.AddAttribute(10, "class", "align-content-end cart-button");
                __builder2.OpenElement(11, "span");
                __builder2.AddAttribute(12, "class", "fa-stack fa-lg cart-stack pa-4");
                __builder2.AddMarkupContent(13, "<i class=\"fa fa-shopping-cart fa-stack-4x\"></i>\r\n                    ");
                __builder2.OpenElement(14, "i");
                __builder2.AddAttribute(15, "class", "fa fa-stack-1x badge");
#nullable restore
#line (12,27)-(12,62) 26 "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
__builder2.AddContent(16, customerBasket?.TotalItemCount ?? 0
 
#line default
#line hidden
#nullable disable
                );
                __builder2.CloseElement();
                __builder2.CloseElement();
                __builder2.CloseElement();
            }
            ));
            __builder.CloseComponent();
#nullable restore
#line (17,1)-(18,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
    }
 
#line default
#line hidden
#nullable disable
 
            __builder.CloseElement();
        }
        #pragma warning restore 1998
#nullable restore
#line (20,8)-(44,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
 
    CustomerBasket? customerBasket;
    bool basketIsAvailable;
 
    [Parameter]
    public EventCallback<bool> BasketAvailabilityChanged { get; set; }
 
    protected override async Task OnInitializedAsync()
    {
        (customerBasket, basketIsAvailable) = await BasketClient.GetBasketAsync("user");
 
        await BasketAvailabilityChanged.InvokeAsync(basketIsAvailable);
    }
 
    private async Task HandleCheckout()
    {
        if (customerBasket is not null)
        {
            await BasketClient.CheckoutBasketAsync("user");
        }
 
        // Preserve query string
        Navigation.NavigateTo($"/{new Uri(Navigation.Uri).Query}");
    }
 
#line default
#line hidden
#nullable disable
 
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private 
#nullable restore
#line (2,9)-(2,26) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
NavigationManager
 
#line default
#line hidden
#nullable disable
         
#nullable restore
#line (2,27)-(2,37) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
Navigation
 
#line default
#line hidden
#nullable disable
         { get; set; }
         = default!;
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private 
#nullable restore
#line (1,9)-(1,28) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
BasketServiceClient
 
#line default
#line hidden
#nullable disable
         
#nullable restore
#line (1,29)-(1,41) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Cart.razor"
BasketClient
 
#line default
#line hidden
#nullable disable
         { get; set; }
         = default!;
    }
}
#pragma warning restore 1591