@using Commerce.Contracts.DTOs
@if (Category.Photos?.Any() == true) { @Category.Translations?.FirstOrDefault()?.Info?.Name ?? string.Empty) } else {
}
@Category.Translations?.FirstOrDefault()?.Info?.Name ?? string.Empty) @if (Category.IsBundle) { Bundle }
@if (IsAdmin) { } else { Visit } @if (Category.ChildCategories?.Any() == true) { } else {
@* Spacer to align cards *@ }
@if (_expanded && Category.ChildCategories?.Any() == true) {
@foreach (var child in Category.ChildCategories) { }
}
@code { [Parameter] public CategoryVM Category { get; set; } = new(); [Parameter] public EventCallback OnEdit { get; set; } [Parameter] public bool IsAdmin { get; set; } = true; private bool _expanded = false; private void ToggleExpand() => _expanded = !_expanded; }