@using BlazorApp.Models;

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

                <div>
                    <div class="content">
                        <div class="css-inv">
                            <div class="slotSpace">
                                <h1>@Localizer["Inventory"]</h1>
                                @for(int i = 0 ; i<18 ; i++)
                                {
                                    <InventoryItem Index=i Item=@this.RecipeItems[i] />
                                }
                    </div>
                    </div>
                </div>
                </div>
            </div>
            <div class="col-6">

                <div>@Localizer["Available"] :</div>
                <div>
                    <button @onclick="SortByame" class="btn btn-secondary">
                        @Localizer["Sort"]
                    </button>
                    <div class="css-grid d-sm-block">
                        <DataGrid TItem="Item"
                                  Data="@Items"
                                  TotalItems="@totalItem"
                                  PageSize="6"
                                  Filterable
                                  FilterMethod="DataGridFilterMethod.StartsWith"
                                  ShowPager
                                  Sortable='true'
                                  ShowCaptions='false'
                                  Responsive>
                            <DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="" Filterable=false />
                            <DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="" Filterable=false>
                                <DisplayTemplate>
                                    <InventoryItem Item="@context" NoDrop="true" Index="-1"/>
                                </DisplayTemplate>
                            </DataGridColumn>
                            <DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Display name" Filterable />
                           
                           
                        </DataGrid>
                    </div>
                </div>

            </div>
            <div>Actions</div>
                <div class="actions" id="actions">
                </div>

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