using Avalonia.Controls;
using Avalonia.Controls.Templates;
namespace LANCommander.Launcher.Plugins;
///
/// Maps view model types to the Avalonia controls that render them. Seeded at startup with the
/// launcher's built-in mappings and extended at runtime by plugins that add navigable views.
/// Consumers apply to a so content is
/// resolved by view model type, replacing the previously hard-coded inline XAML data templates.
///
public interface IViewRegistry
{
/// Register a control factory for the given view model type.
void Register(Type viewModelType, Func factory);
/// Register a control factory for .
void Register(Func factory);
///
/// Build an backed by the current registrations. Matching prefers
/// the most-derived registered type, preserving the launcher's existing rule that
/// DepotGameDetailViewModel resolves before its GameDetailViewModel base.
///
IDataTemplate AsDataTemplate();
}