using Connected.Annotations;
using Connected.Extensions;
using Connected.Utilities;
using Microsoft.AspNetCore.Components;
namespace Connected.Components;
public partial class NavMenu : UIComponent
{
protected string Classname =>
new CssBuilder("mud-navmenu")
.AddClass($"mud-navmenu-{Color.ToDescriptionString()}")
.AddClass($"mud-navmenu-margin-{Margin.ToDescriptionString()}")
.AddClass("mud-navmenu-dense", Dense)
.AddClass("mud-navmenu-rounded", Rounded)
.AddClass($"mud-navmenu-bordered mud-border-{Color.ToDescriptionString()}", Bordered)
.AddClass(Class)
.Build();
[Category(CategoryTypes.NavMenu.Behavior)]
[Parameter] public RenderFragment ChildContent { get; set; }
///
/// The color of the active NavLink.
///
[Parameter]
[Category(CategoryTypes.NavMenu.Appearance)]
public ThemeColor Color { get; set; } = ThemeColor.Default;
///
/// If true, adds a border of the active NavLink, does nothing if variant outlined is used.
///
[Parameter]
[Category(CategoryTypes.NavMenu.Appearance)]
public bool Bordered { get; set; }
///
/// If true, default theme border-radius will be used on all navlinks.
///
[Parameter]
[Category(CategoryTypes.NavMenu.Appearance)]
public bool Rounded { get; set; }
///
/// Adjust the vertical spacing between navlinks.
///
[Parameter]
[Category(CategoryTypes.NavMenu.Appearance)]
public Margin Margin { get; set; } = Margin.None;
///
/// If true, compact vertical padding will be applied to all navmenu items.
///
[Parameter]
[Category(CategoryTypes.NavMenu.Appearance)]
public bool Dense { get; set; }
}