@inherits LayoutComponentBase
@namespace MidrandBooks.Components.Layout
@using Microsoft.AspNetCore.Components
@using MidrandBooks.Components
@using MidrandBooks.Components.Pages
@using MidrandBooks.Models
@if (ActiveTab == "catalog")
{
}
else if (ActiveTab == "library")
{
}
else if (ActiveTab == "author")
{
}
else if (ActiveTab == "terms")
{
}
else if (ActiveTab == "privacy")
{
}
@Body
@if (SelectedBook != null)
{
var isEbookOwned = PurchasedRecords.Any(p => p.BookId == SelectedBook.Id && p.Format == "ebook");
var isEbookCached = OfflineCachedBooks.Contains(SelectedBook.Id);
var isAudioOwned = PurchasedRecords.Any(p => p.BookId == SelectedBook.Id && p.Format == "audiobook");
var ebookInCart = CartItems.Any(i => i.Book.Id == SelectedBook.Id && i.Format == "ebook");
var audioInCart = CartItems.Any(i => i.Book.Id == SelectedBook.Id && i.Format == "audiobook");
}
@if (ActiveReadingBook != null)
{
}
@if (ActivePlayingBook != null)
{
}
@code {
private string ActiveTab { get; set; } = "catalog";
private bool IsCartOpen { get; set; } = false;
private bool IsOfflineMode { get; set; } = false;
// Master list of categories
private List