@using Wave.Data

@if (Articles.Count < 1) {
	<p>No Articles</p>
} else {
	<div class="flex flex-col gap-4">
		@foreach (var article in Articles.OrderByDescending(a => a.PublishDate)) {
			<ArticleCard Article="article" Action="Action" />
		}
	</div>
}

@code {
	[Parameter]
	public required IList<Article> Articles { get; set; } = [];
	[Parameter]
	public RenderFragment<Article>? Action { get; set; }
}
