| | | 1 | | <section class="panel top-gap"> |
| | | 2 | | <h2>Shopkeeper</h2> |
| | | 3 | | <p>Stock expands by charisma tier.</p> |
| | 0 | 4 | | @foreach (var stock in Stock) |
| | | 5 | | { |
| | | 6 | | <div class="row-item"> |
| | 0 | 7 | | <span class="item-name rarity-@stock.Item.DisplayRarity.ToString().ToLower()">@ItemPresentationCatalog.GetLa |
| | | 8 | | <div class="row-actions"> |
| | 0 | 9 | | <button class="action" disabled="@(!CanBuyItem(stock.Item) || !CanPurchaseItem(stock.Item) || Money < st |
| | | 10 | | </div> |
| | | 11 | | </div> |
| | | 12 | | } |
| | | 13 | | </section> |
| | | 14 | | |
| | | 15 | | @code { |
| | 0 | 16 | | [Parameter, EditorRequired] public IReadOnlyList<ShopStock> Stock { get; set; } = []; |
| | 0 | 17 | | [Parameter, EditorRequired] public int Money { get; set; } |
| | 0 | 18 | | [Parameter, EditorRequired] public Func<Item, bool> CanBuyItem { get; set; } = _ => false; |
| | 0 | 19 | | [Parameter, EditorRequired] public Func<Item, bool> CanPurchaseItem { get; set; } = _ => false; |
| | 0 | 20 | | [Parameter, EditorRequired] public Func<Item, int> GetBuyPrice { get; set; } = _ => 0; |
| | 0 | 21 | | [Parameter, EditorRequired] public EventCallback<ShopStock> OnBuy { get; set; } |
| | | 22 | | } |