@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
@using Dynamicweb.Environment;

@{
	var categories = CookieManager.GetCategories();
}

@if (categories.Any())
{
	<div class="h-100 position-relative d-flex flex-column item_@Model.Item.SystemName.ToLower()" data-dw-colorscheme="@Model.ColorScheme?.Id">
		@{ 
			if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle"))
			{
				string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h3");

				<h2 class="@titleFontSize mb-md-3">@Model.Item.GetString("Title")</h2>
			}

			foreach (var category in categories)
			{				
				<div>
					<h3 class="h5">@category</h3>
					<ul>
						@foreach (var cookieName in CookieManager.GetCategoryCookies(category))
						{	
							<li>
								@cookieName
							</li>
						}
					</ul>
				</div>
			}
		}
	</div>
}
