@if (view == View.Surahs)
{
@if (loadingSurahs)
{
}
else
{
@foreach (var s in surahs)
{
}
}
}
else if (view == View.Ayahs)
{
سوره @(selectedSurah?.NameFa ?? "…")
@if (loadingAyahs)
{
}
else
{
@foreach (var a in ayahs)
{
}
}
}
else if (view == View.Detail)
{
@if (loadingDetail || detail is null)
{
}
else
{
@detail.TextAr
@if (!string.IsNullOrWhiteSpace(detail.TextFa))
{
@detail.TextFa
}
@if (!string.IsNullOrWhiteSpace(detail.NotesHtml))
{
نکتهها
@((MarkupString)detail.NotesHtml)
}
@if (!string.IsNullOrWhiteSpace(detail.MessagesHtml))
{
پیامها
@((MarkupString)detail.MessagesHtml)
}
@if (!string.IsNullOrWhiteSpace(detail.VideoEmbedUrl))
{
فیلم
}
}
}
@code {
private enum View { Surahs, Ayahs, Detail }
[Parameter] public string Slug { get; set; } = "";
[Parameter] public int? SurahNumber { get; set; }
[Parameter] public int? AyahNumber { get; set; }
private string title = "تفسیر";
private string author = "";
private Guid tafsirId;
private bool loadingMeta = true;
private bool loadingSurahs;
private bool loadingAyahs;
private bool loadingDetail;
private string? routeKey;
private View view = View.Surahs;
private List