@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
@using Dynamicweb.Frontend.Navigation

@{
	var navigationSettings = new NavigationSettings();
	navigationSettings.StartLevel = 1;
	navigationSettings.StopLevel = 10;
	navigationSettings.ExpandMode = ExpandMode.All;
	navigationSettings.Parameters.Add("ColorScheme", Model.ColorScheme?.Id);
	if (Model.Item.TryGetString("ShowOnlyFirstNavLevel", out var showOnlyFirstNavLevel))
	{
		navigationSettings.Parameters.Add("ShowOnlyFirstNavLevel", showOnlyFirstNavLevel);
	}
	if (Model.Item.TryGetLink("NavigationRoot", out var navigationRoot))
	{
		navigationSettings.RootPageId = navigationRoot.PageId;
	}
	if (Model.Item.TryGetString("Title", out var title))
	{
        <div class="text-end">
		    @title
        </div>
	}
	<div class="nav-wrapper" data-swift-menu="@Model.ID">
        <nav class="d-flex justify-content-end text-end">
            <ul class="nav flex-nowrap flex-column">
                @Navigation.RenderNavigation("Navigation/Navigation.cshtml", navigationSettings)
            </ul>
        </nav>
    </div>
}
