@code { private HashSet expandedCategories = new(); [Parameter] public required Action MenuButtonHandler { get; init; } [Parameter] public required List MenuCategories { get; init; } [Parameter] public required bool IsNavigationOpen { get; init; } private void ToggleCategory(string categoryName) { if (this.expandedCategories.Contains(categoryName)) { this.expandedCategories.Remove(categoryName); } else { this.expandedCategories.Add(categoryName); } } private void ExecuteAction(MenuButton button) { this.MenuButtonHandler?.Invoke(button); } }