using AuroraDesk.Core.Entities;
using System.Collections.ObjectModel;
namespace AuroraDesk.Core.Interfaces;
///
/// 导航状态管理服务接口
/// 负责管理导航项的选中和展开状态,分离状态管理职责
///
public interface INavigationStateService
{
///
/// 初始化导航项状态映射(使用字典缓存提升性能)
///
void InitializeStateMap(ObservableCollection navigationItems);
///
/// 根据 ViewModel 快速查找导航项(使用字典缓存)
///
NavigationItem? FindNavigationItemByViewModel(ReactiveUI.IRoutableViewModel viewModel);
///
/// 重置所有导航项的状态
///
void ResetAllStates();
///
/// 只重置选中状态,保持展开状态
///
void ResetSelectionOnly();
///
/// 重置除指定项外的所有导航项状态
///
void ResetOtherStates(NavigationItem? exceptItem);
///
/// 选中指定导航项
///
void SelectItem(NavigationItem item);
///
/// 切换导航项的展开状态
///
void ToggleExpand(NavigationItem item);
///
/// 查找父导航项
///
NavigationItem? FindParentItem(NavigationItem childItem);
}