@using BTCPayServer.Models.AppViewModels @using BTCPayServer.Payments.Lightning @using LNURL @inject BTCPayNetworkProvider BTCPayNetworkProvider @model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel @{ Context.Request.Query.TryGetValue("cryptocode", out var cryptoCodeValues); var cryptoCode = cryptoCodeValues.FirstOrDefault() ?? "BTC"; Layout = "_LayoutPos"; var anyInventoryItems = Model.Items.Any(item => item.Inventory.HasValue); var supported = Model.Store.GetSupportedPaymentMethods(BTCPayNetworkProvider).OfType().OrderBy(method => method.CryptoCode == cryptoCode).FirstOrDefault(); if (supported != null && !Model.Store.GetEnabledPaymentIds(BTCPayNetworkProvider).Contains(supported.PaymentId)) { supported = null; } } @if (supported is null) { }

@Model.Title

@if (!string.IsNullOrEmpty(Model.Description)) {
@Safe.Raw(Model.Description)
}
@for (int x = 0; x < Model.Items.Length; x++) { var item = Model.Items[x]; var buttonText = string.IsNullOrEmpty(item.BuyButtonText) ? item.Price.Type != ViewPointOfSaleViewModel.Item.ItemPrice.ItemPriceType.Fixed ? Model.CustomButtonText : Model.ButtonText : item.BuyButtonText; buttonText = buttonText.Replace("{0}",item.Price.Formatted) ?.Replace("{Price}",item.Price.Formatted);
@if (!String.IsNullOrWhiteSpace(item.Image)) { } @{CardBody(item.Title, item.Description);}
}
@functions { private void CardBody(string title, string description) {
@title
@if (!String.IsNullOrWhiteSpace(description)) {

@Safe.Raw(description)

}
} }