@model IReadOnlyList<JobsMedical.Web.Services.Crumb>
@* Visible breadcrumb trail. The last crumb is the current page (no link). Pair with the
   BreadcrumbList JSON-LD (SeoJsonLd.Breadcrumb) emitted in @@section Head. *@
@if (Model is { Count: > 1 })
{
    <nav class="breadcrumbs" aria-label="مسیر">
        @for (var i = 0; i < Model.Count; i++)
        {
            if (i > 0) { <span class="bc-sep" aria-hidden="true">›</span> }
            @if (!string.IsNullOrEmpty(Model[i].Url) && i < Model.Count - 1)
            {
                <a href="@Model[i].Url">@Model[i].Name</a>
            }
            else
            {
                <span class="bc-current">@Model[i].Name</span>
            }
        }
    </nav>
}
