File: Components_Pages_Home_razor.g.cs
Project: src\playground\TestShop\MyFrontend\MyFrontend.csproj (MyFrontend)
#pragma checksum "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "c765a7eeccb9311f5b4212b20ab5e6472b290e33764e1964132b263ab96df398"
// <auto-generated/>
#pragma warning disable 1591
namespace MyFrontend.Components.Pages
{
    #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
#line (2,12)-(2,35) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
[StreamRendering(true)]
 
#line default
#line hidden
#nullable disable
 
    [global::Microsoft.AspNetCore.Components.RouteAttribute(
    // language=Route,Component
#nullable restore
#line (1,7)-(1,10) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
"/"
 
#line default
#line hidden
#nullable disable
    )]
    #nullable restore
    public partial class Home : global::Microsoft.AspNetCore.Components.ComponentBase
    #nullable disable
    {
        #pragma warning disable 1998
        protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenComponent<global::Microsoft.AspNetCore.Components.Web.PageTitle>(0);
            __builder.AddAttribute(1, "ChildContent", (global::Microsoft.AspNetCore.Components.RenderFragment)((__builder2) => {
                __builder2.AddContent(2, "TestShop Product Catalog");
            }
            ));
            __builder.CloseComponent();
            __builder.AddMarkupContent(3, "\r\n\r\n");
            __builder.OpenElement(4, "header");
            __builder.AddAttribute(5, "class", "d-flex align-items-center justify-content-center");
            __builder.AddAttribute(6, "b-naes312cw2");
            __builder.AddMarkupContent(7, "<h1 class=\"app-name pa-4\" b-naes312cw2>&lt;TestShop /&gt;</h1>\r\n    <div class=\"flex-spacer\" b-naes312cw2></div>\r\n    ");
            __builder.AddMarkupContent(8, "<h2 class=\"text-align-center\" b-naes312cw2>Product Catalog</h2>\r\n    <div class=\"flex-spacer\" b-naes312cw2></div>\r\n    ");
            __builder.OpenComponent<global::MyFrontend.Components.Cart>(9);
            __builder.AddComponentParameter(10, nameof(global::MyFrontend.Components.Cart.
#nullable restore
#line (13,11)-(13,36) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
BasketAvailabilityChanged
 
#line default
#line hidden
#nullable disable
            ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::Microsoft.AspNetCore.Components.EventCallback<global::System.Boolean>>(global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::System.Boolean>(this, 
#nullable restore
#line (13,38)-(13,69) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
HandleBasketAvailabilityChanged
 
#line default
#line hidden
#nullable disable
            )));
            __builder.CloseComponent();
            __builder.CloseElement();
            __builder.AddMarkupContent(11, "\r\n\r\n");
            __builder.OpenElement(12, "div");
            __builder.AddAttribute(13, "class", "container");
            __builder.AddAttribute(14, "b-naes312cw2");
#nullable restore
#line (17,1)-(17,5) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
    
 
#line default
#line hidden
#nullable disable
 
#nullable restore
#line (17,6)-(19,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
if (catalog is { Data: var data })
    {
 
#line default
#line hidden
#nullable disable
 
            __builder.OpenElement(15, "div");
            __builder.AddAttribute(16, "class", "grid");
            __builder.AddAttribute(17, "b-naes312cw2");
#nullable restore
#line (20,1)-(20,13) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
            
 
#line default
#line hidden
#nullable disable
 
#nullable restore
#line (20,14)-(22,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
foreach (var item in data)
            {
 
#line default
#line hidden
#nullable disable
 
            __builder.OpenElement(18, "div");
            __builder.AddAttribute(19, "class", "grid-item");
            __builder.AddAttribute(20, "data-id", 
#nullable restore
#line (22,50)-(22,57) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
item.Id
 
#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(21, "b-naes312cw2");
            __builder.OpenElement(22, "div");
            __builder.AddAttribute(23, "class", "grid-item-content");
            __builder.AddAttribute(24, "b-naes312cw2");
            __builder.OpenElement(25, "img");
            __builder.AddAttribute(26, "src", "catalog/images/" + (
#nullable restore
#line (24,51)-(24,58) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
item.Id
 
#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(27, "alt", 
#nullable restore
#line (24,66)-(24,75) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
item.Name
 
#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(28, "class", "catalog-item-image");
            __builder.AddAttribute(29, "b-naes312cw2");
            __builder.CloseElement();
            __builder.AddMarkupContent(30, "\r\n                        ");
            __builder.AddMarkupContent(31, "<div class=\"quick-view-overlay\" b-naes312cw2><i class=\"fa fa-search-plus\" aria-hidden=\"true\" b-naes312cw2></i></div>\r\n                        ");
            __builder.OpenElement(32, "div");
            __builder.AddAttribute(33, "class", "grid-item-text");
            __builder.AddAttribute(34, "b-naes312cw2");
            __builder.OpenElement(35, "h4");
            __builder.AddAttribute(36, "class", "pointer-events-none");
            __builder.AddAttribute(37, "b-naes312cw2");
#nullable restore
#line (29,62)-(29,71) 25 "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
__builder.AddContent(38, item.Name
 
#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(39, "\r\n                            ");
            __builder.OpenElement(40, "p");
            __builder.AddAttribute(41, "class", "item-description pointer-events-none");
            __builder.AddAttribute(42, "b-naes312cw2");
#nullable restore
#line (30,78)-(30,94) 25 "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
__builder.AddContent(43, item.Description
 
#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(44, "\r\n                            ");
            __builder.OpenElement(45, "div");
            __builder.AddAttribute(46, "class", "d-flex justify-space-evenly align-items-center");
            __builder.AddAttribute(47, "b-naes312cw2");
            __builder.OpenElement(48, "p");
            __builder.AddAttribute(49, "class", "item-price pointer-events-none");
            __builder.AddAttribute(50, "b-naes312cw2");
#nullable restore
#line (32,76)-(32,100) 25 "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
__builder.AddContent(51, item.Price.ToString("C")
 
#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
#nullable restore
#line (33,1)-(33,33) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
                                
 
#line default
#line hidden
#nullable disable
 
#nullable restore
#line (33,34)-(35,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
if (basketIsAvailable)
                                {
 
#line default
#line hidden
#nullable disable
 
            __builder.OpenComponent<global::MyFrontend.Components.AddToCart>(52);
            __builder.AddComponentParameter(53, nameof(global::MyFrontend.Components.AddToCart.
#nullable restore
#line (35,48)-(35,52) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
Item
 
#line default
#line hidden
#nullable disable
            ), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::MyFrontend.Services.CatalogItem>(
#nullable restore
#line (35,54)-(35,58) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
item
 
#line default
#line hidden
#nullable disable
            ));
            __builder.CloseComponent();
#nullable restore
#line (36,1)-(37,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
                                }
 
#line default
#line hidden
#nullable disable
 
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.CloseElement();
#nullable restore
#line (41,1)-(42,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
            }
 
#line default
#line hidden
#nullable disable
 
            __builder.CloseElement();
#nullable restore
#line (43,1)-(44,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
 
 
#line default
#line hidden
#nullable disable
 
            __builder.OpenElement(54, "div");
            __builder.AddAttribute(55, "class", "pager");
            __builder.AddAttribute(56, "b-naes312cw2");
            __builder.OpenElement(57, "a");
            __builder.AddAttribute(58, "class", "previous button");
            __builder.AddAttribute(59, "disable", 
#nullable restore
#line (45,50)-(45,89) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
paginationInfo.HasPreviousPage is false
 
#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(60, "href", "?before=" + (
#nullable restore
#line (45,106)-(45,128) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
paginationInfo.FirstId
 
#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(61, "b-naes312cw2");
            __builder.AddMarkupContent(62, "<i class=\"fa fa-arrow-left\" aria-hidden=\"true\" b-naes312cw2></i>\r\n                Previous\r\n            ");
            __builder.CloseElement();
            __builder.AddMarkupContent(63, "\r\n\r\n            ");
            __builder.OpenElement(64, "a");
            __builder.AddAttribute(65, "class", "next button");
            __builder.AddAttribute(66, "disable", 
#nullable restore
#line (50,46)-(50,81) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
paginationInfo.HasNextPage is false
 
#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(67, "href", "?after=" + (
#nullable restore
#line (50,97)-(50,118) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
paginationInfo.NextId
 
#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(68, "b-naes312cw2");
            __builder.AddMarkupContent(69, "\r\n                Next\r\n                <i class=\"fa fa-arrow-right\" aria-hidden=\"true\" b-naes312cw2></i>");
            __builder.CloseElement();
            __builder.CloseElement();
#nullable restore
#line (55,1)-(58,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
    }
    else
    {
 
#line default
#line hidden
#nullable disable
 
            __builder.AddMarkupContent(70, "<p class=\"catalog-loading\" b-naes312cw2>Loading product catalog…</p>");
#nullable restore
#line (59,1)-(60,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
    }
 
#line default
#line hidden
#nullable disable
 
            __builder.CloseElement();
            __builder.AddMarkupContent(71, "\r\n\r\n");
            __builder.OpenComponent<global::MyFrontend.Components.Layout.AppFooter>(72);
            __builder.CloseComponent();
        }
        #pragma warning restore 1998
#nullable restore
#line (64,8)-(93,1) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
 
    bool basketIsAvailable;
    Catalog? catalog;
    PaginationInfo paginationInfo = new(FirstId: 0, NextId: 0, HasPreviousPage: false, HasNextPage: false);
 
    [SupplyParameterFromQuery]
    public int? Before { get; set; }
 
    [SupplyParameterFromQuery]
    public int? After { get; set; }
 
    protected override async Task OnInitializedAsync()
    {
        catalog = await CatalogService.GetItemsAsync(Before, After);
 
        if (catalog is null)
        {
            return;
        }
 
        paginationInfo = new PaginationInfo(catalog.FirstId, catalog.NextId, catalog.FirstId > 1, !catalog.IsLastPage);
    }
 
    private void HandleBasketAvailabilityChanged(bool isAvailable)
    {
        basketIsAvailable = isAvailable;
    }
 
    record PaginationInfo(int FirstId, int NextId, bool HasPreviousPage, bool HasNextPage);
 
#line default
#line hidden
#nullable disable
 
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private 
#nullable restore
#line (4,9)-(4,29) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
CatalogServiceClient
 
#line default
#line hidden
#nullable disable
         
#nullable restore
#line (4,30)-(4,44) "D:\a\_work\1\s\playground\TestShop\MyFrontend\Components\Pages\Home.razor"
CatalogService
 
#line default
#line hidden
#nullable disable
         { get; set; }
         = default!;
    }
}
#pragma warning restore 1591