@using System.Security.Claims
@*
    Dashboard sub-menu for logged-in panels (admin / employer / job-seeker).
    Render right under the page header on panel pages: <partial name="_PanelNav" />
*@
@{
    var p = ViewContext.HttpContext.Request.Path.Value ?? "";
    bool On(string path) => p.Equals(path, StringComparison.OrdinalIgnoreCase)
        || p.StartsWith(path + "/", StringComparison.OrdinalIgnoreCase);
}
<nav class="panel-nav">
    <div class="container panel-nav-inner">
        @if (User.IsInRole("Admin"))
        {
            <a class="@(On("/Admin/Overview") ? "active" : null)" asp-page="/Admin/Overview">📊 داشبورد</a>
            <a class="@(On("/Admin/Index") ? "active" : null)" asp-page="/Admin/Index">📥 صف آگهی‌ها</a>
            <a class="@(On("/Admin/Ingested") ? "active" : null)" asp-page="/Admin/Ingested">📜 نتایج جمع‌آوری</a>
            <a class="@(On("/Admin/Facilities") ? "active" : null)" asp-page="/Admin/Facilities">🏥 مراکز</a>
            <a class="@(On("/Admin/Users") ? "active" : null)" asp-page="/Admin/Users">👥 کاربران</a>
            <a class="@(On("/Admin/Reports") ? "active" : null)" asp-page="/Admin/Reports">🛡️ گزارش‌ها</a>
            <a class="@(On("/Admin/Broadcast") ? "active" : null)" asp-page="/Admin/Broadcast">📣 اعلان همگانی</a>
            <a class="@(On("/Admin/Settings") ? "active" : null)" asp-page="/Admin/Settings">⚙️ تنظیمات</a>
        }
        else if (User.IsInRole("FacilityAdmin"))
        {
            <a class="@(On("/Employer/Index") ? "active" : null)" asp-page="/Employer/Index">🏥 داشبورد مرکز</a>
            <a class="@(On("/Employer/PostShift") ? "active" : null)" asp-page="/Employer/PostShift">＋ ثبت شیفت</a>
            <a class="@(On("/Employer/PostJob") ? "active" : null)" asp-page="/Employer/PostJob">＋ ثبت استخدام</a>
            <a class="@(On("/Me/Index") ? "active" : null)" asp-page="/Me/Index">🗂️ پنل کارجو</a>
            <a class="@(On("/Me/Profile") ? "active" : null)" asp-page="/Me/Profile">👤 پروفایل</a>
        }
        else
        {
            <a class="@(On("/Me/Index") ? "active" : null)" asp-page="/Me/Index">🏠 داشبورد</a>
            <a class="@(On("/Me/Alerts") ? "active" : null)" asp-page="/Me/Alerts">🔎 هشدارهای شغلی</a>
            <a class="@(On("/Preferences/Index") ? "active" : null)" asp-page="/Preferences/Index">⭐ علاقه‌مندی‌ها</a>
            <a class="@(On("/Me/Notifications") ? "active" : null)" asp-page="/Me/Notifications">🔔 اعلان‌ها</a>
            <a class="@(On("/Me/Profile") ? "active" : null)" asp-page="/Me/Profile">👤 پروفایل</a>
        }
    </div>
</nav>
