@model Project
@{
    var activeSection = ViewData["ProjectSection"] as string ?? "Overview";
    var projectId = Model.ProjectID;

    string ActiveClass(string section) =>
        string.Equals(activeSection, section, StringComparison.OrdinalIgnoreCase) ? "active" : string.Empty;
}

<section class="pw-project-nav" aria-label="Project navigation">
    <span class="pw-project-nav__label">Project navigation</span>
    <nav class="pw-project-nav__links" aria-label="Project sections">
        <a class="pw-project-nav__link @(ActiveClass("Overview"))" asp-controller="Projects" asp-action="Details" asp-route-id="@projectId">Overview</a>
        <a class="pw-project-nav__link @(ActiveClass("Timeline"))" asp-controller="Timeline" asp-action="Index" asp-route-projectId="@projectId">Timeline</a>
        <a class="pw-project-nav__link @(ActiveClass("Characters"))" asp-controller="Characters" asp-action="Index" asp-route-projectId="@projectId">Characters</a>
        <a class="pw-project-nav__link @(ActiveClass("Relationships"))" asp-controller="RelationshipMap" asp-action="Index" asp-route-projectId="@projectId">Relationships</a>
        <a class="pw-project-nav__link @(ActiveClass("Assets"))" asp-controller="StoryAssets" asp-action="Index" asp-route-projectId="@projectId">Assets</a>
        <a class="pw-project-nav__link @(ActiveClass("Locations"))" asp-controller="Locations" asp-action="Index" asp-route-projectId="@projectId">Locations</a>
        <a class="pw-project-nav__link @(ActiveClass("Floor Plans"))" asp-controller="FloorPlans" asp-action="Index" asp-route-projectId="@projectId">Floor Plans</a>
        <a class="pw-project-nav__link @(ActiveClass("Threads"))" asp-controller="PlotThreads" asp-action="Index" asp-route-projectId="@projectId">Threads</a>
        <a class="pw-project-nav__link @(ActiveClass("Metrics"))" asp-controller="ProjectMetrics" asp-action="Index" asp-route-projectId="@projectId">Metrics</a>
        <a class="pw-project-nav__link @(ActiveClass("Scenarios"))" asp-controller="Scenarios" asp-action="Index" asp-route-projectId="@projectId">Scenarios</a>
        <a class="pw-project-nav__link @(ActiveClass("Story Bible"))" asp-controller="StoryBible" asp-action="Index" asp-route-projectId="@projectId">Story Bible</a>
        <a class="pw-project-nav__link @(ActiveClass("Continuity Explorer"))" asp-controller="ContinuityExplorer" asp-action="Index" asp-route-projectId="@projectId">Continuity Explorer</a>
        <a class="pw-project-nav__link @(ActiveClass("Health"))" asp-controller="Analytics" asp-action="Index" asp-route-projectId="@projectId">Health</a>
        <a class="pw-project-nav__link @(ActiveClass("Warnings"))" asp-controller="Warnings" asp-action="Index" asp-route-projectId="@projectId">Warnings</a>
        <a class="pw-project-nav__link @(ActiveClass("Archive"))" asp-controller="Archives" asp-action="Index" asp-route-projectId="@projectId">Archive</a>
    </nav>
</section>
