using Microsoft.AspNetCore.Mvc.Rendering;

namespace Admin.Extensions
{
    public static class NavActiveExtensions
    {
        public static string IsActive(this IHtmlHelper html, string page)
        {
            return string.Equals(html.ViewContext.RouteData.Values["page"]?.ToString(), page, StringComparison.OrdinalIgnoreCase) ? "active" : "";
        }
    }
}