@using BlazorApp.Components;
@using BlazorApp.Pages;
@using BlazorApp.Models;

<CascadingValue Value="@this">
    <div class="container">
        <div class="row">
            <div class="col-6">

                <div>Inventory:</div>
                <div>


                    <div class="css-grid">
                        <InventoryItem Index="0" />
                        <InventoryItem Index="1" />
                        <InventoryItem Index="2" />
                        <InventoryItem Index="3" />
                        <InventoryItem Index="4" />
                        <InventoryItem Index="5" />
                        <InventoryItem Index="6" />
                        <InventoryItem Index="7" />
                        <InventoryItem Index="8" />
                        <InventoryItem Index="9" />
                        <InventoryItem Index="10" />
                        <InventoryItem Index="11" />
                        <InventoryItem Index="12" />
                        <InventoryItem Index="13" />
                        <InventoryItem Index="14" />
                        <InventoryItem Index="15" />
                        <InventoryItem Index="16" />
                        <InventoryItem Index="17" />
                    </div>

                </div>

            </div>

            <div class="col-6">

            </div>
                
    <div>Available items:</div>

<<<<<<< Updated upstream
        <div>

            <DataGrid TItem="Item"
                      Data="@Items"
                      ReadData="@OnReadData"
                      TotalItems="@totalItem"
                      PageSize="10"
                      ShowPager
                      
                      Sortable="true">
                <Button type="submit" @onclick="() => SortByName()">SORT</Button>
               
                <DataGridColumn TItem="Item" Field="@nameof(Item.Id)">
                    <DisplayTemplate>
                        @if (!string.IsNullOrWhiteSpace(context.ImageBase64))
                        {
                            <img src="data:image/png;base64, @(context.ImageBase64)" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="min-width: 50px; max-width: 50px" />
                        }
                        else
                        {
                            <img src="images/default.png" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="max-width: 150px" />
                        }
                    </DisplayTemplate>
                </DataGridColumn>
                <DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" />
            </DataGrid>
=======
    <div>

        <DataGrid TItem="Item"
                  Data="@Items"
                  ReadData="@OnReadData"
                  TotalItems="@totalItem"
                  PageSize="10"
                  ShowPager
                  Sortable="true">

            <Button type="submit" @onclick="() => SortByName()">SORT</Button>

>>>>>>> Stashed changes

            <DataGridColumn TItem="Item" Field="@nameof(Item.Id)">
                <DisplayTemplate>
                    <InventoryItem Item="@context" NoDrop="true" />
                </DisplayTemplate>
            </DataGridColumn>
            <DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" />
        </DataGrid>
    </div>


    </div>
        
            
    </div>
</CascadingValue>